Classes | Macros | Typedefs | Functions | Variables
inertial-sense-sdk/src/serialPort.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for inertial-sense-sdk/src/serialPort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  serial_port_t
 

Macros

#define BAUDRATE_1000000   1000000
 
#define BAUDRATE_115200   115200
 
#define BAUDRATE_1200   1200
 
#define BAUDRATE_1220000   1220000
 
#define BAUDRATE_1440000   1440000
 
#define BAUDRATE_1500000   1500000
 
#define BAUDRATE_19200   19200
 
#define BAUDRATE_2000000   2000000
 
#define BAUDRATE_230400   230400
 
#define BAUDRATE_2400   2400
 
#define BAUDRATE_300   300
 
#define BAUDRATE_3000000   3000000
 
#define BAUDRATE_38400   38400
 
#define BAUDRATE_460800   460800
 
#define BAUDRATE_4800   4800
 
#define BAUDRATE_57600   57600
 
#define BAUDRATE_600   600
 
#define BAUDRATE_921600   921600
 
#define BAUDRATE_9600   9600
 
#define MAX_SERIAL_PORT_NAME_LENGTH   63
 

Typedefs

typedef int(* pfnSerialPortAsyncRead) (serial_port_t *serialPort, unsigned char *buf, int len, pfnSerialPortAsyncReadCompletion completion)
 
typedef void(* pfnSerialPortAsyncReadCompletion) (serial_port_t *serialPort, unsigned char *buf, int len, int errorCode)
 
typedef int(* pfnSerialPortClose) (serial_port_t *serialPort)
 
typedef int(* pfnSerialPortFlush) (serial_port_t *serialPort)
 
typedef int(* pfnSerialPortGetByteCountAvailableToRead) (serial_port_t *serialPort)
 
typedef int(* pfnSerialPortGetByteCountAvailableToWrite) (serial_port_t *serialPort)
 
typedef int(* pfnSerialPortIsOpen) (serial_port_t *serialPort)
 
typedef int(* pfnSerialPortOpen) (serial_port_t *serialPort, const char *port, int baudRate, int blocking)
 
typedef int(* pfnSerialPortRead) (serial_port_t *serialPort, unsigned char *buf, int len, int timeoutMilliseconds)
 
typedef int(* pfnSerialPortSleep) (int sleepMilliseconds)
 
typedef int(* pfnSerialPortWrite) (serial_port_t *serialPort, const unsigned char *buf, int len)
 
typedef struct serial_port_t serial_port_t
 

Functions

int serialPortClose (serial_port_t *serialPort)
 
int serialPortFlush (serial_port_t *serialPort)
 
int serialPortGetByteCountAvailableToRead (serial_port_t *serialPort)
 
int serialPortGetByteCountAvailableToWrite (serial_port_t *serialPort)
 
int serialPortIsOpen (serial_port_t *serialPort)
 
int serialPortOpen (serial_port_t *serialPort, const char *port, int baudRate, int blocking)
 
int serialPortOpenRetry (serial_port_t *serialPort, const char *port, int baudRate, int blocking)
 
int serialPortRead (serial_port_t *serialPort, unsigned char *buffer, int readCount)
 
int serialPortReadAscii (serial_port_t *serialPort, unsigned char *buffer, int bufferLength, unsigned char **asciiData)
 
int serialPortReadAsciiTimeout (serial_port_t *serialPort, unsigned char *buffer, int bufferLength, int timeoutMilliseconds, unsigned char **asciiData)
 
int serialPortReadChar (serial_port_t *serialPort, unsigned char *c)
 
int serialPortReadCharTimeout (serial_port_t *serialPort, unsigned char *c, int timeoutMilliseconds)
 
int serialPortReadLine (serial_port_t *serialPort, unsigned char *buffer, int bufferLength)
 
int serialPortReadLineTimeout (serial_port_t *serialPort, unsigned char *buffer, int bufferLength, int timeoutMilliseconds)
 
int serialPortReadTimeout (serial_port_t *serialPort, unsigned char *buffer, int readCount, int timeoutMilliseconds)
 
int serialPortReadTimeoutAsync (serial_port_t *serialPort, unsigned char *buffer, int readCount, pfnSerialPortAsyncReadCompletion callback)
 
void serialPortSetPort (serial_port_t *serialPort, const char *port)
 
int serialPortSleep (serial_port_t *serialPort, int sleepMilliseconds)
 
int serialPortWaitFor (serial_port_t *serialPort, const unsigned char *waitFor, int waitForLength)
 
int serialPortWaitForTimeout (serial_port_t *serialPort, const unsigned char *waitFor, int waitForLength, int timeoutMilliseconds)
 
int serialPortWrite (serial_port_t *serialPort, const unsigned char *buffer, int writeCount)
 
int serialPortWriteAndWaitFor (serial_port_t *serialPort, const unsigned char *buffer, int writeCount, const unsigned char *waitFor, int waitForLength)
 
int serialPortWriteAndWaitForTimeout (serial_port_t *serialPort, const unsigned char *buffer, int writeCount, const unsigned char *waitFor, int waitForLength, const int timeoutMilliseconds)
 
int serialPortWriteAscii (serial_port_t *serialPort, const char *buffer, int bufferLength)
 
int serialPortWriteLine (serial_port_t *serialPort, const unsigned char *buffer, int writeCount)
 

Variables

int SERIAL_PORT_DEFAULT_TIMEOUT
 

Macro Definition Documentation

◆ BAUDRATE_1000000

#define BAUDRATE_1000000   1000000

Definition at line 42 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_115200

#define BAUDRATE_115200   115200

Definition at line 38 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_1200

#define BAUDRATE_1200   1200

Definition at line 31 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_1220000

#define BAUDRATE_1220000   1220000

Definition at line 43 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_1440000

#define BAUDRATE_1440000   1440000

Definition at line 44 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_1500000

#define BAUDRATE_1500000   1500000

Definition at line 45 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_19200

#define BAUDRATE_19200   19200

Definition at line 35 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_2000000

#define BAUDRATE_2000000   2000000

Definition at line 46 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_230400

#define BAUDRATE_230400   230400

Definition at line 39 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_2400

#define BAUDRATE_2400   2400

Definition at line 32 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_300

#define BAUDRATE_300   300

Definition at line 29 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_3000000

#define BAUDRATE_3000000   3000000

Definition at line 47 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_38400

#define BAUDRATE_38400   38400

Definition at line 36 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_460800

#define BAUDRATE_460800   460800

Definition at line 40 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_4800

#define BAUDRATE_4800   4800

Definition at line 33 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_57600

#define BAUDRATE_57600   57600

Definition at line 37 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_600

#define BAUDRATE_600   600

Definition at line 30 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_921600

#define BAUDRATE_921600   921600

Definition at line 41 of file inertial-sense-sdk/src/serialPort.h.

◆ BAUDRATE_9600

#define BAUDRATE_9600   9600

Definition at line 34 of file inertial-sense-sdk/src/serialPort.h.

◆ MAX_SERIAL_PORT_NAME_LENGTH

#define MAX_SERIAL_PORT_NAME_LENGTH   63

Definition at line 26 of file inertial-sense-sdk/src/serialPort.h.

Typedef Documentation

◆ pfnSerialPortAsyncRead

typedef int(* pfnSerialPortAsyncRead) (serial_port_t *serialPort, unsigned char *buf, int len, pfnSerialPortAsyncReadCompletion completion)

Definition at line 55 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortAsyncReadCompletion

typedef void(* pfnSerialPortAsyncReadCompletion) (serial_port_t *serialPort, unsigned char *buf, int len, int errorCode)

Definition at line 54 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortClose

typedef int(* pfnSerialPortClose) (serial_port_t *serialPort)

Definition at line 57 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortFlush

typedef int(* pfnSerialPortFlush) (serial_port_t *serialPort)

Definition at line 58 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortGetByteCountAvailableToRead

typedef int(* pfnSerialPortGetByteCountAvailableToRead) (serial_port_t *serialPort)

Definition at line 59 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortGetByteCountAvailableToWrite

typedef int(* pfnSerialPortGetByteCountAvailableToWrite) (serial_port_t *serialPort)

Definition at line 60 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortIsOpen

typedef int(* pfnSerialPortIsOpen) (serial_port_t *serialPort)

Definition at line 52 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortOpen

typedef int(* pfnSerialPortOpen) (serial_port_t *serialPort, const char *port, int baudRate, int blocking)

Definition at line 51 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortRead

typedef int(* pfnSerialPortRead) (serial_port_t *serialPort, unsigned char *buf, int len, int timeoutMilliseconds)

Definition at line 53 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortSleep

typedef int(* pfnSerialPortSleep) (int sleepMilliseconds)

Definition at line 61 of file inertial-sense-sdk/src/serialPort.h.

◆ pfnSerialPortWrite

typedef int(* pfnSerialPortWrite) (serial_port_t *serialPort, const unsigned char *buf, int len)

Definition at line 56 of file inertial-sense-sdk/src/serialPort.h.

◆ serial_port_t

typedef struct serial_port_t serial_port_t

Definition at line 49 of file inertial-sense-sdk/src/serialPort.h.

Function Documentation

◆ serialPortClose()

int serialPortClose ( serial_port_t serialPort)

Definition at line 66 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortFlush()

int serialPortFlush ( serial_port_t serialPort)

Definition at line 75 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortGetByteCountAvailableToRead()

int serialPortGetByteCountAvailableToRead ( serial_port_t serialPort)

Definition at line 329 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortGetByteCountAvailableToWrite()

int serialPortGetByteCountAvailableToWrite ( serial_port_t serialPort)

Definition at line 339 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortIsOpen()

int serialPortIsOpen ( serial_port_t serialPort)

Definition at line 57 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortOpen()

int serialPortOpen ( serial_port_t serialPort,
const char *  port,
int  baudRate,
int  blocking 
)

Definition at line 28 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortOpenRetry()

int serialPortOpenRetry ( serial_port_t serialPort,
const char *  port,
int  baudRate,
int  blocking 
)

Definition at line 37 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortRead()

int serialPortRead ( serial_port_t serialPort,
unsigned char *  buffer,
int  readCount 
)

Definition at line 84 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadAscii()

int serialPortReadAscii ( serial_port_t serialPort,
unsigned char *  buffer,
int  bufferLength,
unsigned char **  asciiData 
)

Definition at line 145 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadAsciiTimeout()

int serialPortReadAsciiTimeout ( serial_port_t serialPort,
unsigned char *  buffer,
int  bufferLength,
int  timeoutMilliseconds,
unsigned char **  asciiData 
)

Definition at line 150 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadChar()

int serialPortReadChar ( serial_port_t serialPort,
unsigned char *  c 
)

Definition at line 191 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadCharTimeout()

int serialPortReadCharTimeout ( serial_port_t serialPort,
unsigned char *  c,
int  timeoutMilliseconds 
)

Definition at line 196 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadLine()

int serialPortReadLine ( serial_port_t serialPort,
unsigned char *  buffer,
int  bufferLength 
)

Definition at line 116 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadLineTimeout()

int serialPortReadLineTimeout ( serial_port_t serialPort,
unsigned char *  buffer,
int  bufferLength,
int  timeoutMilliseconds 
)

Definition at line 121 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadTimeout()

int serialPortReadTimeout ( serial_port_t serialPort,
unsigned char *  buffer,
int  readCount,
int  timeoutMilliseconds 
)

Definition at line 89 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortReadTimeoutAsync()

int serialPortReadTimeoutAsync ( serial_port_t serialPort,
unsigned char *  buffer,
int  readCount,
pfnSerialPortAsyncReadCompletion  callback 
)

Definition at line 106 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortSetPort()

void serialPortSetPort ( serial_port_t serialPort,
const char *  port 
)

Definition at line 18 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortSleep()

int serialPortSleep ( serial_port_t serialPort,
int  sleepMilliseconds 
)

Definition at line 349 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWaitFor()

int serialPortWaitFor ( serial_port_t serialPort,
const unsigned char *  waitFor,
int  waitForLength 
)

Definition at line 303 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWaitForTimeout()

int serialPortWaitForTimeout ( serial_port_t serialPort,
const unsigned char *  waitFor,
int  waitForLength,
int  timeoutMilliseconds 
)

Definition at line 308 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWrite()

int serialPortWrite ( serial_port_t serialPort,
const unsigned char *  buffer,
int  writeCount 
)

Definition at line 201 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWriteAndWaitFor()

int serialPortWriteAndWaitFor ( serial_port_t serialPort,
const unsigned char *  buffer,
int  writeCount,
const unsigned char *  waitFor,
int  waitForLength 
)

Definition at line 281 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWriteAndWaitForTimeout()

int serialPortWriteAndWaitForTimeout ( serial_port_t serialPort,
const unsigned char *  buffer,
int  writeCount,
const unsigned char *  waitFor,
int  waitForLength,
const int  timeoutMilliseconds 
)

Definition at line 286 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWriteAscii()

int serialPortWriteAscii ( serial_port_t serialPort,
const char *  buffer,
int  bufferLength 
)

Definition at line 230 of file inertial-sense-sdk/src/serialPort.c.

◆ serialPortWriteLine()

int serialPortWriteLine ( serial_port_t serialPort,
const unsigned char *  buffer,
int  writeCount 
)

Definition at line 218 of file inertial-sense-sdk/src/serialPort.c.

Variable Documentation

◆ SERIAL_PORT_DEFAULT_TIMEOUT

int SERIAL_PORT_DEFAULT_TIMEOUT

Definition at line 16 of file inertial-sense-sdk/src/serialPort.c.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:07