|
int | SDEVLP_start (struct serdisp_s *dd) |
|
int | SDEVLP_stop (struct serdisp_s *dd) |
|
int | SDEVLP_getstatus (struct serdisp_s *dd) |
|
int | SDEVLP_add_listener (struct serdisp_s *dd, byte gpid, fp_eventlistener_t eventlistener) |
| add an event listener for a GPI More...
|
|
int | SDEVLP_del_listener (struct serdisp_s *dd, byte gpid, fp_eventlistener_t eventlistener) |
| delete an event listener defined for a GPI More...
|
|
int | SDEVLP_purge_listeners (struct serdisp_s *dd, byte gpid) |
| purge all event listeners defined for a GPI More...
|
|
int | SDEVLP_count_listeners (struct serdisp_s *dd, byte gpid) |
| count number of event listeners defined for a GPI More...
|
|
|
byte | SDGPO_getamount (struct serdisp_s *dd) |
|
byte | SDGPO_gettype (struct serdisp_s *dd, byte gpid) |
|
byte | SDGPO_search (struct serdisp_s *dd, const char *gpname) |
|
SDGPO_t * | SDGPO_getdescriptor (struct serdisp_s *dd, byte gpid) |
|
int | SDGPO_invert (struct serdisp_s *dd, byte gpid) |
|
int | SDGPO_setvalue (struct serdisp_s *dd, byte gpid, int32_t value) |
|
int | SDGPO_setpackage (struct serdisp_s *dd, byte gpid, byte *data, int32_t length) |
|
|
byte | SDGPI_getamount (struct serdisp_s *dd) |
|
byte | SDGPI_gettype (struct serdisp_s *dd, byte gpid) |
|
byte | SDGPI_search (struct serdisp_s *dd, const char *gpname) |
|
SDGPI_t * | SDGPI_getdescriptor (struct serdisp_s *dd, byte gpid) |
|
int | SDGPI_isenabled (struct serdisp_s *dd, byte gpid) |
|
int | SDGPI_enable (struct serdisp_s *dd, byte gpid, int enable) |
|
int | SDGPI_getstreamfd (struct serdisp_s *dd, byte gpid) |
|
Introduction
serdisp_gpevents.h offers functions and definition for
- general purpose items
- event handling.
Features
General Purpose Items
serdisplib supports both incoming and outgoing general purpose items
- general purpose input (GPI): some event or value sent to the library from a device
- general purpose output (GPO): some event or value sent from the library to a device
Event-Handling
int SDEVLP_add_listener |
( |
struct serdisp_s * |
dd, |
|
|
byte |
gpid, |
|
|
fp_eventlistener_t |
eventlistener |
|
) |
| |
- Parameters
-
dd | device descriptor |
gpid | GPI id |
eventlistener | eventlistener (function pointer) to be added |
- Return values
-
0 | successfully added eventlistener |
1 | eventlistener already available |
<0 | unsuccessful |
- Since
- 1.98.0
int SDEVLP_count_listeners |
( |
struct serdisp_s * |
dd, |
|
|
byte |
gpid |
|
) |
| |
- Parameters
-
dd | device descriptor |
gpid | GPI id (0xFF -> count all listeners) |
- Return values
-
>=0 | number of event listeners in chain |
<0 | unsuccessful |
- Since
- 1.98.0
int SDEVLP_del_listener |
( |
struct serdisp_s * |
dd, |
|
|
byte |
gpid, |
|
|
fp_eventlistener_t |
eventlistener |
|
) |
| |
- Parameters
-
dd | device descriptor |
gpid | GPI id |
eventlistener | eventlistener (function pointer) to be deleted |
- Return values
-
0 | successfully deleted eventlistener |
1 | eventlistener not in list |
<0 | unsuccessful |
- Since
- 1.98.0
int SDEVLP_purge_listeners |
( |
struct serdisp_s * |
dd, |
|
|
byte |
gpid |
|
) |
| |
- Parameters
-
dd | device descriptor |
gpid | GPI id (0xFF -> purge all listeners) |
- Return values
-
0 | successfully purged eventlisteners |
<0 | unsuccessful |
- Since
- 1.98.0
void SDGPT_event_header_hton |
( |
struct SDGP_event_s * |
event | ) |
|
void SDGPT_event_header_ntoh |
( |
struct SDGP_event_s * |
event | ) |
|
void SDGPT_event_payload_hton |
( |
void * |
payload, |
|
|
int |
bytes, |
|
|
byte |
word_length |
|
) |
| |
- Parameters
-
payload | event payload |
bytes | amount of event payload data |
word_length | word length of a payload data |
- Since
- 1.98.0
void SDGPT_event_payload_ntoh |
( |
void * |
payload, |
|
|
int |
bytes, |
|
|
byte |
word_length |
|
) |
| |
- Parameters
-
payload | event payload |
bytes | amount of event payload data |
word_length | word length of a payload data |
- Since
- 1.98.0