14 &ascd->
asc, &ascd->
ascVersion, &ascd->appVersion, &ascd->command,
16 if (ascd->command ==
'\0') {
18 }
else if (ascd->command ==
'r' || ascd->command ==
'w') {
21 ascd->command, ascd->
dataBuffer, ascd->dataLen,
22 ascd->config->state_rw);
25 &ascd->
asc, ascd->
ascVersion, ascd->appVersion, ascd->command,
26 ascd->
dataBuffer, ascd->dataLen, ASC_ERROR_COMMAND_NOT_IMPLEMENTED);
28 }
else if (ascd->command ==
's') {
29 if (ascd->config->
func_s) {
31 ascd->command, ascd->
dataBuffer, ascd->dataLen,
32 ascd->config->state_s);
35 &ascd->
asc, ascd->
ascVersion, ascd->appVersion, ascd->command,
36 ascd->
dataBuffer, ascd->dataLen, ASC_ERROR_COMMAND_NOT_IMPLEMENTED);
38 }
else if (ascd->command ==
'n' || ascd->command ==
'f') {
41 ascd->command, ascd->
dataBuffer, ascd->dataLen,
42 ascd->config->state_nf);
45 &ascd->
asc, ascd->
ascVersion, ascd->appVersion, ascd->command,
46 ascd->
dataBuffer, ascd->dataLen, ASC_ERROR_COMMAND_NOT_IMPLEMENTED);
48 }
else if (ascd->command ==
'z') {
52 &ascd->
asc, ascd->
ascVersion, ascd->appVersion, ascd->command,
53 ascd->
dataBuffer, ascd->dataLen, ASC_ERROR_COMMAND_NOT_IMPLEMENTED);
69 char command,
char *data,
size_t dataLen) {
71 &ascd->
asc, ascVersion, appVersion, command, data, dataLen);
78 &ascd->
asc, ascVersion, appVersion, data, dataLen);
circular_buffer_uint8 * ascii_serial_com_get_output_buffer(ascii_serial_com *asc)
ASCII Serial Com get output buffer.
void ascii_serial_com_put_s_message_in_output_buffer(ascii_serial_com *asc, char ascVersion, char appVersion, const char *data, size_t dataLen)
ASCII Serial Com Pack and put 's' message in output buffer.
void ascii_serial_com_init(ascii_serial_com *asc)
ASCII Serial Com Interface init method.
void ascii_serial_com_put_message_in_output_buffer(ascii_serial_com *asc, char ascVersion, char appVersion, char command, const char *data, size_t dataLen)
ASCII Serial Com Pack and put message in output buffer.
void ascii_serial_com_get_message_from_input_buffer(ascii_serial_com *asc, char *ascVersion, char *appVersion, char *command, char *data, size_t *dataLen)
ASCII Serial Com pop message from input buffer and unpack.
void ascii_serial_com_put_error_in_output_buffer(ascii_serial_com *asc, char ascVersion, char appVersion, char command, char *data, size_t dataLen, enum asc_exception errorCode)
ASCII Serial Com put error message in out buffer.
circular_buffer_uint8 * ascii_serial_com_get_input_buffer(ascii_serial_com *asc)
ASCII Serial Com get input buffer.
circular_buffer_uint8 * ascii_serial_com_device_get_output_buffer(ascii_serial_com_device *ascd)
ASCII Serial Com Device get output buffer.
void ascii_serial_com_device_receive(ascii_serial_com_device *ascd)
ASCII Serial Com Device receive messages.
void ascii_serial_com_device_put_s_message_in_output_buffer(ascii_serial_com_device *ascd, char ascVersion, char appVersion, char *data, size_t dataLen)
ASCII Serial Com Device put a 's' message in output buffer.
circular_buffer_uint8 * ascii_serial_com_device_get_input_buffer(ascii_serial_com_device *ascd)
ASCII Serial Com Device get input buffer.
void ascii_serial_com_device_put_message_in_output_buffer(ascii_serial_com_device *ascd, char ascVersion, char appVersion, char command, char *data, size_t dataLen)
ASCII Serial Com Device put a message in output buffer.
void ascii_serial_com_device_init(ascii_serial_com_device *ascd, ascii_serial_com_device_config *config)
ASCII Serial Com Device init.
ASCII Serial Com Device Config Struct.
void(* func_nf)(ascii_serial_com *, char, char, char, char *data, size_t, void *)
void(* func_s)(ascii_serial_com *, char, char, char, char *data, size_t, void *)
void(* func_rw)(ascii_serial_com *, char, char, char, char *data, size_t, void *)
ASCII Serial Com Device State struct.
char dataBuffer[MAXDATALEN]