sss7modem/software/linux/libsss7.h

41 lines
718 B
C
Raw Normal View History

2016-11-26 16:49:03 +01:00
#ifndef _LIBSSS7_H_
#define _LIBSSS7_H_
2016-12-03 22:58:55 +01:00
#include<stdint.h>
#define LIBSSS7_PAYLOAD_SIZE 16
2016-11-26 16:49:03 +01:00
2016-12-03 19:17:54 +01:00
// See libsss7.c for more detailed descriptions
2017-12-27 21:34:20 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2016-12-03 19:17:54 +01:00
// Setup function
2016-11-26 16:49:03 +01:00
int libsss7_start(char *serialport);
2016-12-03 19:17:54 +01:00
// Checks if a frame can be sent
2016-11-26 16:49:03 +01:00
int libsss7_can_send(void);
2016-12-03 19:17:54 +01:00
// Send a frame with the payload msg
2016-12-03 22:58:55 +01:00
void libsss7_send(uint8_t msg[LIBSSS7_PAYLOAD_SIZE]);
2016-11-26 16:49:03 +01:00
2016-12-03 19:17:54 +01:00
// Check if the last transmission failed
2016-11-26 16:49:03 +01:00
int libsss7_send_failed(void);
2016-12-03 19:17:54 +01:00
// Check if there are received payloads in the rx buffer
2016-11-26 16:49:03 +01:00
int libsss7_has_received(void);
2016-12-03 19:17:54 +01:00
// Get a payload from the rx buffer
void libsss7_get_received(uint8_t *msg);
2016-11-26 16:49:03 +01:00
2016-12-03 19:17:54 +01:00
// Teardown function
2017-12-27 21:34:20 +01:00
void libsss7_stop(void);
#ifdef __cplusplus
}
#endif
2016-11-26 16:49:03 +01:00
#endif