async def request_complete(self): """Send a Reset command to message receivers.""" logger.info('Resetting connection...') message = Message(self.name_path, 1) await self.issue_command( Command( message, additional_events=[self.connection_synchronizer.disconnected])) logger.debug('Reset command acknowledged, connection lost!') await self.connection_synchronizer.connected.wait() logger.debug('Connection fully reset!')
async def request_complete(self, periods: int): """Send a BuiltinLED/Blink request command to message receivers. Blink the built-in LED for a finite number of periods. """ # TODO: validate periods message = Message(self.name_path, 1) wait_channels = [self.name_path, self.name_path, self.name_path + 'p'] await self.periods.request(periods) logger.debug('Starting to blink the LED...') await self.issue_command(Command(message, wait_channels)) logger.debug('Finished blinking the LED...')
async def request_complete_iterations_interval(self, number: int, iterations_interval: int): """Send a LA/_Notify request command to message receivers. Receives a finite number of notifications. """ message = Message(self.name_path, 1) wait_channels = [self.name_path, self.number.name_path, self.name_path] await self.number.request(number) await self.interval.request(iterations_interval) logger.debug('Starting to notify on {}...'.format( self.parent.channel_path)) await self.issue_command(Command(message, wait_channels)) logger.debug('Finished notifying on {}...'.format( self.parent.channel_path))
async def request_complete(self, position: Optional[int] = None): """Send a LA/FC request command to message receivers.""" # TODO: validate the state message = Message(self.name_path, position) wait_channels = [ # Initial responses self.name_path, self.parent.name_path, # Responses after actuator stops self.parent.position.name_path, self.name_path, self.parent.name_path ] logger.debug('Starting feedback control...') await self.issue_command(Command(message, wait_channels)) logger.debug('Finished feedback control!')
async def request(self): """Send a Version command to message receivers.""" message = Message('v') wait_channels = ['v0', 'v1', 'v2'] await self.issue_command(Command(message, wait_channels))
async def request(self): """Send a Version/_ request command to message receivers.""" message = Message(self.name_path) await self.issue_command(Command(message))
async def request(self, state: Optional[int]=None): """Send a LinearActuator request command to message receivers.""" # TODO: validate the state message = Message(self.name_path, state) await self.issue_command(Command(message))
async def request(self, periods: Optional[int]=None): """Send a BuiltinLED/Blink/Notify request command to message receivers.""" # TODO: validate the periods message = Message(self.name_path, periods) await self.issue_command(Command(message))
async def request(self, number: Optional[int] = None): """Send a LA/_/Notify/Number request command to message receivers.""" # TODO: validate the number message = Message(self.name_path, number) await self.issue_command(Command(message))
async def request(self, timeout: Optional[int] = None): """Send a LA/FC/ConvergenceTimeout request command to message receivers.""" # TODO: validate the timeout message = Message(self.name_path, timeout) await self.issue_command(Command(message))
async def request(self, coefficient: Optional[int] = None): """Send a LA/FC/PID/_ request command to message receivers.""" # TODO: validate the coefficient message = Message(self.name_path, coefficient) await self.issue_command(Command(message))
async def request(self, position_difference: Optional[int] = None): """Send a LA/SP/ActivityThreshold request command to message receivers.""" # TODO: validate the multiplier message = Message(self.name_path, position_difference) await self.issue_command(Command(message))
async def request(self, position: Optional[int] = None): """Send a LA/SP/RangeHigh request command to message receivers.""" # TODO: validate the multiplier message = Message(self.name_path, position) await self.issue_command(Command(message))
async def request(self, multiplier: Optional[int] = None): """Send a LA/SP/SnapMultiplier request command to message receivers.""" # TODO: validate the multiplier message = Message(self.name_path, multiplier) await self.issue_command(Command(message))
async def request(self, interval: Optional[int] = None): """Send a LA/_/Notify/Interval request command to message receivers.""" # TODO: validate the timeout message = Message(self.name_path, interval) await self.issue_command(Command(message))
async def request(self, state: Optional[int] = None): """Send a LA/_/Notify/ChangeOnly request command to message receivers.""" # TODO: validate the state message = Message(self.name_path, state) await self.issue_command(Command(message))
async def request(self, position: Optional[int] = None): """Send a LA/FC/Limits/Motor/_/_ request command to message receivers.""" # TODO: validate the position message = Message(self.name_path, position) await self.issue_command(Command(message))
async def request(self): """Send a Reset command to message receivers.""" logger.info('Resetting connection...') message = Message(self.name_path, 1) await self.issue_command(Command(message)) logger.debug('Reset command acknowledged!')
async def request(self, pin: int): """Send a IOPins/_/_ request command to message receivers.""" # TODO: validate the pin number message = Message('{}{}'.format(self.name_path, pin)) await self.issue_command(Command(message))
async def request(self): """Send a LA/Position request command to message receivers.""" # TODO: validate the state message = Message(self.name_path) await self.issue_command(Command(message))
async def request(self, interval: Optional[int]=None): """Send a BuiltinLED/Blink/LowInterval request command to message receivers.""" # TODO: validate the interval message = Message(self.name_path, interval) await self.issue_command(Command(message))