YAMI4Industry
Typedefs | Enumerations
callbacks.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef void(* yami_raw_message_function )(const char target[], const uint8_t header[], size_t header_size, const uint8_t body[], size_t body_size)
 
typedef void(* yami_message_function )(const char target[], enum yami_message_type message_type, const char object_name[], const char message_name[], const char exception_msg[], int64_t message_id, const uint8_t body[], size_t body_size)
 
typedef void(* yami_io_error_function )(int32_t error_code, const char description[])
 
typedef void(* yami_connection_event_function )(enum yami_connection_event event, const char target[])
 

Enumerations

enum  yami_message_type { yami_incoming_message, yami_message_reply, yami_message_rejected, yami_message_abandoned }
 
enum  yami_connection_event { yami_new_outgoing_connection, yami_new_incoming_connection, yami_connection_closed }
 

Typedef Documentation

typedef void(* yami_connection_event_function)(enum yami_connection_event event, const char target[])

Type of function callback for reporting connection events.

Parameters
eventkind of connection event (open, closed)
targetremote endpoint name
typedef void(* yami_io_error_function)(int32_t error_code, const char description[])

Type of function callback for I/O error logging.

Parameters
error_codecopy of errno or other error indicator as set by the system or 0 if exact error number cannot be obtained
descriptionerror message
typedef void(* yami_message_function)(const char target[], enum yami_message_type message_type, const char object_name[], const char message_name[], const char exception_msg[], int64_t message_id, const uint8_t body[], size_t body_size)

Type of function callback for high-level message delivery.

Parameters
targetendpoint name of the message sender
message_typetype of message notification
object_namename of logical message destination (valid only for yami_incoming_message)
message_namename of message (valid only for yami_incoming_message)
exception_msgdescription of problem at the receiver side (valid only for yami_incoming_message)
message_idhigh-level message identifier
bodybody buffer (valid only for yami_incoming_message and for yami_message_reply)
body_sizesize of the body buffer (valid only for yami_incoming_message and for yami_message_reply)
typedef void(* yami_raw_message_function)(const char target[], const uint8_t header[], size_t header_size, const uint8_t body[], size_t body_size)

Type of function callback for raw message delivery.

Parameters
targetendpoint name of the message sender
headerheader buffer
header_sizesize of the header buffer
bodybody buffer
body_sizesize of the body buffer

Enumeration Type Documentation

Type of connection event notification

Enumerator
yami_new_outgoing_connection 
yami_new_incoming_connection 
yami_connection_closed 

Type of message for high-level message delivery.

Enumerator
yami_incoming_message 
yami_message_reply 
yami_message_rejected 
yami_message_abandoned