|
| void | encode_int32 (int32_t data, unsigned char *buffer) |
| | Write the specified data as a sequence of bytes starting at the specified address.
|
| void | encode_int64 (int64_t data, unsigned char *buffer) |
| | Write the specified data as a sequence of bytes starting at the specified address.
|
| void | encode_tag (unsigned char *buffer, tag_t tag) |
| | Encode tag information into buffer.
|
| void | encode_uint16 (uint16_t data, unsigned char *buffer) |
| | Write the specified data as a sequence of bytes starting at the specified address.
|
| void | encode_uint32 (uint32_t data, unsigned char *buffer) |
| | Write the specified data as a sequence of bytes starting at the specified address.
|
| void | extract_header (unsigned char *buffer, uint16_t *port_id, uint16_t *federate_id, size_t *length) |
| | Extract the core header information that all messages between federates share.
|
| int32_t | extract_int32 (unsigned char *bytes) |
| | This will swap the order of the bytes if this machine is big endian.
|
| int64_t | extract_int64 (unsigned char *bytes) |
| | This will swap the order of the bytes if this machine is big endian.
|
| bool | extract_match_group (const char *rti_addr, char *dest, regmatch_t group, size_t max_len, size_t min_len, const char *err_msg) |
| | Extract one match group from the rti_addr regex .
|
| bool | extract_match_groups (const char *rti_addr, char **rti_addr_strs, bool **rti_addr_flags, regmatch_t *group_array, int *gids, size_t *max_lens, size_t *min_lens, const char **err_msgs) |
| | Extract match groups from the rti_addr regex.
|
| void | extract_rti_addr_info (const char *rti_addr, rti_addr_info_t *rti_addr_info) |
| | Extract the host, port and user from rti_addr.
|
| tag_t | extract_tag (unsigned char *buffer) |
| | Extract tag information from buffer.
|
| void | extract_timed_header (unsigned char *buffer, uint16_t *port_id, uint16_t *federate_id, size_t *length, tag_t *tag) |
| | Extract the timed header information for timed messages between federates.
|
| uint16_t | extract_uint16 (unsigned char *bytes) |
| | Extract an uint16_t from the specified byte sequence.
|
| int | host_is_big_endian (void) |
| | Return true (1) if the host is big endian.
|
| bool | match_regex (const char *str, char *regex) |
| | Check whether str matches regex.
|
| int32_t | swap_bytes_if_big_endian_int32 (int32_t src) |
| | If this host is little endian, then reverse the order of the bytes of the argument.
|
| int64_t | swap_bytes_if_big_endian_int64 (int64_t src) |
| | If this host is little endian, then reverse the order of the bytes of the argument.
|
| uint16_t | swap_bytes_if_big_endian_uint16 (uint16_t src) |
| | If this host is little endian, then reverse the order of the bytes of the argument.
|
| bool | validate_host (const char *host) |
| | Check whether host is valid.
|
| bool | validate_port (char *port) |
| | Check whether port is valid.
|
| bool | validate_user (const char *user) |
| | Check whether user is valid.
|
Network utility functions for Lingua Franca programs.
- Author
- Edward A. Lee
-
Soroush Bateni
Header file for network utility functions for Lingua Franca programs. Note that these functions do not acquire any mutexes. To use them, you must ensure either that only one thread ever sends on each socket and one thread receives on each socket (these two can be the same thread) or that the caller handles mutual exclusion to prevent more than one thread from accessing the socket at a time.