IndustrialIO¶
- class IndustrialIOClient¶
- Canonical
kortex_api.autogen.client_stubs.IndustrialIOClientRpc
- __init__(router, namespace=None)¶
Constructs a IndustrialIOClient with an initialized
RouterClient
and an optional namespace.- Parameters
router (RouterClient) –
RouterClient
used for the communicationnamespace (string) – Optional namespace on which to initialize the IndustrialIOClient (defaults to
None
)
- IsAlive(timeoutMs: int = 1000)¶
Returns
True
if the Service Server is detected online beforetimeoutMs
is expired,False
otherwise.- Parameters
timeoutMs (unsigned int) – The maximum time to wait for an answer from the server
- Return type
bool
- SetDigitalOutputConfiguration(digitaloutputconfiguration, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Configures a digital output channel.The channel.identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitaloutputconfiguration (DigitalOutputConfiguration) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetDigitalOutputConfiguration(digitalchannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves a digital output configuration for a specific channel.The identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalchannelidentifier (DigitalChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- SetDigitalOutputHighState(digitalchannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Sets a digital output channel to a high state.The identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalchannelidentifier (DigitalChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- SetDigitalOutputLowState(digitalchannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Sets a digital output channel to a low state.The identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalchannelidentifier (DigitalChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetDigitalOutputInfo(digitalchannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves a digital output channel information.The identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalchannelidentifier (DigitalChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- GetAllDigitalOutputInfo(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves all digital output channel information.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- SetDigitalInputConfiguration(digitalinputconfiguration, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Configures a digital input channel.The channel.identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalinputconfiguration (DigitalInputConfiguration) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetDigitalInputConfiguration(digitalchannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves a digital input configuration for a specific channel.The identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalchannelidentifier (DigitalChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- GetDigitalInputInfo(digitalchannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves a digital input channel information.The identifier must be between 1 and 8.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
digitalchannelidentifier (DigitalChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- GetAllDigitalInputInfo(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves all digital input channel informaion.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- SetAnalogIOConfiguration(analogioconfiguration, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Configures an analog input/output channel.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
analogioconfiguration (AnalogIOConfiguration) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetAnalogIOConfiguration(analogiochannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves an analog input/output configuration for a specific channel.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
analogiochannelidentifier (AnalogIOChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- SetAnalogValue(analogoutput, deviceId=0, options=RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Sets an analog value on a channel.The dac_value is the value to set, either in V or mA.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.An ERROR_INTERNAL will be thrown if the channel is not configured as an output also.An ERROR_DEVICE, ENTITY_NOT_FOUND will be thrown if the dac_value is out of bounds. The exception message will contain the limits.- Parameters
analogoutput (AnalogOutput) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- GetAnalogIOInfo(analogiochannelidentifier, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves an analog input/output channel information.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
analogiochannelidentifier (AnalogIOChannelIdentifier) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- GetAllAnalogIOInfo(deviceId = 0, options = RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Retrieves all analog input/output channel information.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Return type
- ClearFaults(deviceId = 0, options = RouterClientSendOptions())¶
- The
CONFIGURE
permission is necessary to call this RPC.Clears digital and analog I/O faults.An ERROR_INTERNAL will be thrown if the I/O board is not powered up.- Parameters
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- Unsubscribe(notificationhandle, deviceId=0, options=RouterClientSendOptions())¶
- The
READ_ONLY
permission is necessary to call this RPC.Unsubscribes client from receiving notifications for the specified topic.- Parameters
notificationhandle (NotificationHandle) –
deviceId (int) – Device’s Id called by rpc (optional)
options (RouterClientSendOptions) – Router options for sending the message
- OnNotificationDigitalOutputChangeTopic(callback, notificationoptions)¶
- The
READ_ONLY
permission is necessary to call this RPC.Subscribes to digital output change topic for notifications.- Parameters
callback (function) – Function callback taking a
DigitalOutputChangeNotification
as only argument, and returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- OnNotificationDigitalInputChangeTopic(callback, notificationoptions)¶
- The
READ_ONLY
permission is necessary to call this RPC.Subscribes to digital input change topic for notifications.- Parameters
callback (function) – Function callback taking a
DigitalInputChangeNotification
as only argument, and returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- OnNotificationAnalogIOChangeTopic(callback, notificationoptions)¶
- The
READ_ONLY
permission is necessary to call this RPC.Subscribes to analog input/output change topic for notifications.- Parameters
callback (function) – Function callback taking a
AnalogIOChangeNotification
as only argument, and returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type
- OnNotificationWristAnalogIOChangeTopic(callback, notificationoptions)¶
- The
READ_ONLY
permission is necessary to call this RPC.Subscribes to wrist’s analog configuration change topic for notifications.This notification is only emitted when the Industrial I/O Plugin changes the wrist’s configuration.It’s not emitted when the analog value changes.- Parameters
callback (function) – Function callback taking a
AnalogIOChangeNotification
as only argument, and returningNone
.notificationoptions (NotificationOptions) – Notification options
- Return type