#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "za_serial.h"
Go to the source code of this file.
◆ copy_until_delim()
static size_t copy_until_delim |
( |
char * |
destination, |
|
|
const char * |
source, |
|
|
const char |
delim, |
|
|
size_t |
destination_length |
|
) |
| |
|
static |
◆ decode_alert()
static int decode_alert |
( |
struct za_reply * |
destination, |
|
|
char * |
reply |
|
) |
| |
|
static |
◆ decode_info()
static int decode_info |
( |
struct za_reply * |
destination, |
|
|
char * |
reply |
|
) |
| |
|
static |
◆ decode_reply()
static int decode_reply |
( |
struct za_reply * |
destination, |
|
|
char * |
reply |
|
) |
| |
|
static |
◆ za_decode()
int za_decode |
( |
struct za_reply * |
destination, |
|
|
char * |
reply |
|
) |
| |
Build a za_reply struct from a string pointed-to by reply.
The za_reply struct can then be used to gain easier access to the parts of an ASCII reply.
- Parameters
-
[out] | destination | a pointer to a za_reply struct to be populated with the data found in reply. |
[in] | reply | a pointer to a string containing a full reply from a Zaber device, as specified by the ASCII protocol manual. |
- Returns
- Z_SUCCESS on success, Z_ERROR_NULL_PARAMETER if destination or reply is NULL, or Z_ERROR_COULD_NOT_DECODE if the reply is malformed.
Definition at line 756 of file za_serial.c.
◆ za_set_verbose()
void za_set_verbose |
( |
int |
value | ) |
|
Sets whether errors and extra info are reported to stderr
.
Set value to 0 to disable all output. Additionally, you can compile this library with the macro NDEBUG defined, which will disable all output and skip checks to "verbose" altogether in the compiled code.
- Parameters
-
[in] | value | whether or not the program should output error messages and info to stderr . |
Definition at line 18 of file za_serial.c.
◆ za_verbose