Lines Matching +full:no +full:- +full:disconnect
3 # SPDX-License-Identifier: Apache-2.0
5 '''Runner for performing program download over CANopen (DSP 302-3).'''
20 # Default Python-CAN context to use, see python-can documentation for details
50 setattr(namespace, self.dest, not option_string.startswith('--no-'))
53 '''Runner front-end for CANopen.'''
89 def dev_id_help(cls) -> str:
95 parser.add_argument('--node-id', dest='dev_id',
98 parser.add_argument('--can-context', default=DEFAULT_CAN_CONTEXT,
99 help=f'Python-CAN context to use (default: {DEFAULT_CAN_CONTEXT})')
100 parser.add_argument('--program-number', type=int, default=DEFAULT_PROGRAM_NUMBER,
102 parser.add_argument('--confirm', '--no-confirm',
106 parser.add_argument('--confirm-only', default=False, action='store_true',
107 help='confirm only, no program download (default: no)')
108 parser.add_argument('--timeout', type=float, default=DEFAULT_TIMEOUT,
110 parser.add_argument('--sdo-retries', type=int, default=DEFAULT_SDO_RETRIES,
112 parser.add_argument('--sdo-timeout', type=float, default=DEFAULT_SDO_TIMEOUT,
115 parser.add_argument('--download-buffer-size', type=int,
119 parser.add_argument('--block-transfer', default=False, action='store_true',
120 help='Use SDO block transfers (experimental, default: no)')
140 '-i/--dev-id or --node-id command-line switch.')
163 self.downloader.disconnect()
188 self.downloader.disconnect()
222 def disconnect(self): member in CANopenProgramDownloader
223 '''Disconnect from CAN network'''
224 self.network.disconnect()
227 '''Enter pre-operational NMT state'''
228 self.logger.info("Entering pre-operational mode")
230 self.node.nmt.state = 'PRE-OPERATIONAL'
232 raise ValueError('Failed to enter pre-operational mode') from err
302 '''Wait for boot-up message reception'''
303 self.logger.info('Waiting for boot-up message...')
307 raise ValueError('Timeout waiting for boot-up message') from err