Io Access
- group IO_access
Functions
-
BOOL IoChannelSetValue(API_HANDLE, const char *channel_name, double value)
set a logical value on a given channel, depending on the channel type mtf will set the appropriate channel property (Current, Voltage …) with respect to the IO function defined in the configuration.
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
value – : logical value, to be interpreted by mtf
- Returns:
BOOL
-
BOOL IoChannelSetRawValue(API_HANDLE, const char *channel_name, unsigned int value)
depending on the channel type this function changes the I/O channel state. This function is useful in the case of digital channels.
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
value – : channel property value
- Returns:
BOOL
-
BOOL IoChannelApplyFaulty(API_HANDLE, const char *channel_name, FaultyType type)
apply fault (shortcut to battery/shortcut to GND) continually after calling this method, to stop this action you can use the function IoChannelStopFaulty
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
type – : fault type
- Returns:
BOOL
-
BOOL IoChannelStopFaulty(API_HANDLE, const char *channel_name, FaultyType type)
stop fault (shortcut to battery/shortcut to GND) in a given channel
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
type – : fault type
- Returns:
BOOL
-
BOOL IoChannelSetCurrent(API_HANDLE, const char *channel_name, float value)
set current of given I/O channel this method is used for all channels except power supply channels, for PS channels use method SetCurrent
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
value – :current value
- Returns:
BOOL
-
BOOL IoChannelSetResistance(API_HANDLE, const char *channel_name, unsigned int value)
set resistance of a given I/O channel
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
value – : resistance value
- Returns:
BOOL
-
BOOL IoChannelSetVoltage(API_HANDLE, const char *channel_name, float value)
set voltage on a given channel This method is used for all channels except power supply channels, for PS channels use method SetVoltage
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
value – : voltage value
- Returns:
BOOL
-
BOOL IoChannelGeneratePattern(API_HANDLE, const char *channel_name, const uint8_t *payload, size_t payload_size)
change I/O voltage with respect to a given pattern (exp PWM pattern). I/O channel function is used to define which pattern to be generated
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
payload – : array containing list of parameters value to be used for generating the pattern
payload_size – : payload size
- Returns:
BOOL
-
double IoChannelGetLastValue(API_HANDLE, const char *channel_name, const char *property_name)
read given property on last received event from I/O channel.
- Parameters:
channel_name – : channel name like defined in the config file (*.yaml)
property_name – : property to read
- Returns:
double
-
BOOL IoChannelSetValue(API_HANDLE, const char *channel_name, double value)