TURAG-Feldbus
|
Implements slave side TURAG feldbus für Stellantriebe support. More...
#include <feldbus/device/feldbus_base.h>
#include <feldbus/device/feldbus_config_check.h>
Go to the source code of this file.
Classes | |
union | feldbus_stellantriebe_value_buffer_t |
Functions | |
struct | __attribute__ ((packed)) |
void | turag_feldbus_stellantriebe_init (feldbus_stellantriebe_command_t *command_set, const char **command_names, uint8_t command_set_length, TuragFeldbusPacketProcessor package_processor) |
Sets up this module. More... | |
void | turag_feldbus_stellantriebe_value_changed (uint8_t key) |
This function is called after a value was changed. More... | |
FeldbusSize_t | turag_feldbus_stellantriebe_process_package (const uint8_t *message, FeldbusSize_t message_length, uint8_t *response) |
Variables | |
feldbus_stellantriebe_command_t | |
feldbus_stellantriebe_value_buffer_t | feldbus_stellantriebe_old_value |
Buffers the old value of a changed entry of the command set. | |
Implements slave side TURAG feldbus für Stellantriebe support.
struct __attribute__ | ( | (packed) | ) |
pointer to the actual value
is the value allowed to be altered by the host?
length of the value
factor that should be applied to the returned values by the host. can be set to 0.0f to indicate that the value is a control value (not floating point)
void turag_feldbus_stellantriebe_init | ( | feldbus_stellantriebe_command_t * | command_set, |
const char ** | command_names, | ||
uint8_t | command_set_length, | ||
TuragFeldbusPacketProcessor | package_processor | ||
) |
Sets up this module.
This function calls turag_feldbus_slave_init(), so you should not do this again.
command_set | pointer to array containing the command set definition of the device |
command_names | pointer to array of strings describing the command set |
command_set_length | length of the command set |
package_processor | This function is called upon the reception of packages that are not handled by the Stellantriebe protocol. Pass 0 if you don't need it. |
void turag_feldbus_stellantriebe_value_changed | ( | uint8_t | key | ) |
This function is called after a value was changed.
You can use this function to start certain actions that have to follow the change of a value or you can check whether the new value is a valid one and if not, change it back using the variable feldbus_stellantriebe_old_value that always holds the original value of the entry that was changed last.
key | of the changed value |