TURAG-Feldbus
|
This module implements support for the TURAG Feldbus für Stellantriebe device protocol. More...
Files | |
file | feldbus_stellantriebe.h |
Implements slave side TURAG feldbus für Stellantriebe support. | |
This module implements support for the TURAG Feldbus für Stellantriebe device protocol.
This device protocol was designed to meet the communication requirements of usual mechanical actors.
As a main feature it is possible to define a table of values within the device's firmware which is called command set. This table is used by the protocol implementation to enable read and or write access to these values. For each entry of the command set you can adjust the length, write access and a factor which needs to be applied to the returned raw value to get a value of the correct physical dimension. This is useful to avoid expensive floating point operations in potentially slow devices. The different possible configuration options are defined in the protocol specification header. The actual location in memory of an entry of the command set is given with a void pointer to the corresponding address. Generally the entries of the command set are supposed to have a meaning that justifies them to be handled as floating point values (values with a physical representation of some kind). However by setting the factor to 0.0f you can indicate that the value should rather be seen as a control value.
Additionally it is possible to supply a human-understandable description for each value which needs to be supplied in a separate array of strings.
Ein weiteres wichtiges Feature ist die Ausgabe zusammenhängender Gerätewerte. Dafür wird im Gerät ein Puffer vorgesehen. Der Client kann eine Liste gewünschter abzufragender Werte übermitteln. Danach kann beliebig oft mit einem simplen Befehl das Versenden der kompletten Daten initiiert werden. Auf diese Art und Weise können größere Datenmengen mit geringst möglichem Overhead vom Gerät abgefragt werden und zum Beispiel zur grafischen Darstellung benutzt werden.
Die folgenden Makros werden von diesem Protokoll in feldbus_config.h erwartet:
TURAG_FELDBUS_STELLANTRIEBE_COMMAND_NAMES_USING_AVR_PROGMEM:
Weist die Firmware an, dass die Zeichenketten, die die Gerätewerte beschreiben, mit dem PROGMEM-Macro gespeichert wurden.
TURAG_FELDBUS_STELLANTRIEBE_STRUCTURED_OUTPUT_BUFFER_SIZE:
Gibt an, wieviel Speicher für die zusammenhängende Datenausgabe verwendet werden soll. Diese Zahl beeinflusst, wieviele Gerätewerte maximal gemeinsam ausgegeben werden können.