SYNOPSIS
#include <hal.h>
int hal_signal_new(const char *signal_name, hal_type_t type);
int hal_signal_delete(const char *signal_name);
int hal_link(const char *pin_name, const char *signal_name);
int hal_unlink(const char pin_name);
ARGUMENTE
- signal_name
-
Der Name des Signals.
- pin_name
-
Der Name des Pins.
- type
-
Der Typ des Signals, wie in hal_type_t(3) angegeben.
BESCHREIBUNG
The hal_signal_new() function creates a new signal object. Once a signal has been created, pins can be linked to it with hal_link(). The signal object contains the actual storage for the signal data. Pin objects linked to the signal have pointers that point to the data. The signal_name cannot be longer than HAL_NAME_LEN characters. If there is already a signal with the same name the call will fail.
The hal_link() function links a pin to a signal. If the pin is already linked to the desired signal, the command succeeds. If the pin is already linked to some other signal, it is an error. In either case, the existing connection is not modified. (Use hal_unlink() to break an existing connection.) If the signal already has other pins linked to it, they are unaffected. One signal can be linked to many pins, but a pin can be linked to only one signal.
The hal_unlink() functions unlinks any signal from the specified pin.
The hal_signal_delete() function deletes a signal object. Any pins linked to the signal object are unlinked.
RETURN VALUE
Gibt einen HAL-Statuscode zurück.
SIEHE AUCH
hal_type_t(3)