libicsc  1.0.0
 All Data Structures Files Functions Modules
Functions
Sending

Functions used for sending data to a remote station. More...

Functions

int icsc_send_array (icsc_ptr icsc, uint8_t station, char command, uint8_t len, const char *data)
 Send an array of data (or struct as if it were an array) to a remote station. More...
 
int icsc_send_string (icsc_ptr icsc, uint8_t station, char command, const char *str)
 Send a text string to a remote station. More...
 
int icsc_send_long (icsc_ptr icsc, uint8_t station, char command, int32_t data)
 Send a 32-bit integer to a remote station. More...
 
int icsc_send_int (icsc_ptr icsc, uint8_t station, char command, int16_t data)
 Send a 16-bit integer to a remote station. More...
 
int icsc_send_char (icsc_ptr icsc, uint8_t station, char command, int8_t data)
 Send an 8-bit integer to a remote station. More...
 

Detailed Description

Functions used for sending data to a remote station.

Function Documentation

int icsc_send_array ( icsc_ptr  icsc,
uint8_t  station,
char  command,
uint8_t  len,
const char *  data 
)

Send an array of data (or struct as if it were an array) to a remote station.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
stationDestination station to send to
commandCommand character to trigger at the remote station
lenThe length of the array or size of the struct
dataThe data to send
Returns
0 on success, -1 on error.
int icsc_send_char ( icsc_ptr  icsc,
uint8_t  station,
char  command,
int8_t  data 
)

Send an 8-bit integer to a remote station.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
stationDestination station to send to
commandCommand character to trigger at the remote station
dataThe integer to send
Returns
0 on success, -1 on error.
int icsc_send_int ( icsc_ptr  icsc,
uint8_t  station,
char  command,
int16_t  data 
)

Send a 16-bit integer to a remote station.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
stationDestination station to send to
commandCommand character to trigger at the remote station
dataThe integer to send
Returns
0 on success, -1 on error.
int icsc_send_long ( icsc_ptr  icsc,
uint8_t  station,
char  command,
int32_t  data 
)

Send a 32-bit integer to a remote station.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
stationDestination station to send to
commandCommand character to trigger at the remote station
dataThe integer to send
Returns
0 on success, -1 on error.
int icsc_send_string ( icsc_ptr  icsc,
uint8_t  station,
char  command,
const char *  str 
)

Send a text string to a remote station.

Parameters
icscPointer to an icsc context created using icsc_init() or icsc_init_de()
stationDestination station to send to
commandCommand character to trigger at the remote station
strThe string to send
Returns
0 on success, -1 on error.