18 #ifndef YAMI4INDUSTRY_CHANNEL_H
19 #define YAMI4INDUSTRY_CHANNEL_H
77 const char target[],
const struct yami_options * options,
84 uint32_t core_message_id,
85 const uint8_t header[],
size_t header_size,
86 const uint8_t body[],
size_t body_size);
89 const char object_name[],
const char message_name[],
90 int64_t message_id, uint32_t core_message_id,
91 const uint8_t body[],
size_t body_size);
94 int64_t message_id, uint32_t core_message_id,
95 const uint8_t body[],
size_t body_size);
98 int64_t message_id, uint32_t core_message_id,
enum yami_protocol protocol_
Definition: channel.h:40
void(* yami_io_error_function)(int32_t error_code, const char description[])
Definition: callbacks.h:81
#define MAX_LENGTH_OF_TARGET_NAME
Definition: limits.h:23
enum yami_result yami_channel_post_message(struct yami_channel *self, const char object_name[], const char message_name[], int64_t message_id, uint32_t core_message_id, const uint8_t body[], size_t body_size)
Definition: channel.c:213
yami_result
Definition: common.h:28
size_t output_data_written_so_far_
Definition: channel.h:50
enum yami_result yami_channel_post_raw_message(struct yami_channel *self, uint32_t core_message_id, const uint8_t header[], size_t header_size, const uint8_t body[], size_t body_size)
Definition: channel.c:120
enum yami_result yami_channel_open(struct yami_channel *self, const char target[], const struct yami_options *options, yami_io_error_function io_error_callback)
Definition: channel.c:66
int32_t socket_ready_for_output_
Definition: channel.h:45
char target_[MAX_LENGTH_OF_TARGET_NAME]
Definition: channel.h:63
#define MAX_OUTGOING_MESSAGE_PAYLOAD
Definition: limits.h:30
int32_t socket_ready_for_input_
Definition: channel.h:46
uint8_t input_buffer_[MAX_INCOMING_MESSAGE_PAYLOAD]
Definition: channel.h:66
int32_t yami_channel_is_open(const struct yami_channel *self)
Definition: channel.c:38
enum yami_result yami_channel_read_some_data(struct yami_channel *self, yami_io_error_function io_error_callback)
Definition: channel.c:551
size_t output_data_size_
Definition: channel.h:49
uint16_t port_
Definition: channel.h:43
#define MAX_INCOMING_MESSAGE_PAYLOAD
Definition: limits.h:33
int32_t yami_channel_name_cmp(const struct yami_channel *self, const char target[])
Definition: channel.c:56
uint32_t input_message_id_
Definition: channel.h:55
size_t input_data_read_so_far_
Definition: channel.h:54
uint8_t output_buffer_[MAX_OUTGOING_MESSAGE_PAYLOAD]
Definition: channel.h:65
size_t input_message_payload_size_
Definition: channel.h:57
enum yami_result yami_channel_post_reject(struct yami_channel *self, int64_t message_id, uint32_t core_message_id, const char reason[])
Definition: channel.c:280
enum yami_result yami_channel_post_reply(struct yami_channel *self, int64_t message_id, uint32_t core_message_id, const uint8_t body[], size_t body_size)
Definition: channel.c:249
enum yami_result yami_channel_write_some_data(struct yami_channel *self, yami_io_error_function io_error_callback)
Definition: channel.c:369
enum yami_result yami_channel_close(struct yami_channel *self, yami_io_error_function io_error_callback)
Definition: channel.c:100
enum yami_result yami_channel_check_udp_packet(struct yami_channel *self)
Definition: channel.c:500
int64_t output_message_id_
Definition: channel.h:51
int32_t socket_
Definition: channel.h:38
int32_t input_message_complete_
Definition: channel.h:58
yami_protocol
Definition: channel.h:34
void yami_channel_clean_input_buffer(struct yami_channel *const self)
Definition: channel.c:493
uint32_t host_
Definition: channel.h:42
void yami_channel_init(struct yami_channel *self)
Definition: channel.c:24
int32_t output_buffer_has_data_
Definition: channel.h:48
size_t input_message_header_size_
Definition: channel.h:56
int32_t input_buffer_has_space_
Definition: channel.h:53