12 #if !defined(ZA_SERIAL_H)
15 #if defined(__cplusplus)
201 #if defined(__cplusplus)
char message_type
The message type will always be '@' for replies.
Definition: za_serial.h:35
int za_send(z_port port, const char *command)
Sends a command to a serial port.
Provides programmatic access to reply data.
Definition: za_serial.h:32
int za_setbaud(z_port port, int baud)
Changes the baud rate of both input and output.
int za_connect(z_port *port, const char *port_name)
Connect to a serial port specified by port_name.
Defines a few things that all of the serial API has in common.
char warning_flags[3]
The highest priority warning for the device, or – under normal conditions.
Definition: za_serial.h:47
int axis_number
The axis number: 0-9, where 0 refers to the whole device, and 1-9 refer only to that specific axis...
Definition: za_serial.h:40
char reply_flags[3]
Whether a command was accepted or rejected: either "OK" or "RJ".
Definition: za_serial.h:42
int device_address
The address of the device, an integer between 1 and 99.
Definition: za_serial.h:37
int za_decode(struct za_reply *destination, char *reply)
Build a za_reply struct from a string pointed-to by reply.
char response_data[128]
The response for the command executed.
Definition: za_serial.h:50
int za_drain(z_port port)
Flushes all input received but not yet read, and attempts to drain all input that would be incoming...
HANDLE z_port
A type to represent a port connected to one or more Zaber devices.
Definition: z_common.h:31
char device_status[5]
Either "BUSY" when the axis is moving, or "IDLE" when it isn't.
Definition: za_serial.h:44
int za_receive(z_port port, char *destination, int length)
Reads a message from the serial port.
int za_disconnect(z_port port)
Gracefully closes a connection.
void za_set_verbose(int value)
Sets whether errors and extra info are reported to stderr.