/* * Copyright (c) 2025 Real-Time Innovations, Inc. All rights reserved. * No duplications, whole or partial, manual or electronic, may be made * without express written permission. Any such copies, or revisions thereof, * must display this notice unaltered. * This code contains trade secrets of Real-Time Innovations, Inc. */ #ifndef commend_log_h #define commend_log_h #ifndef log_common_h #include "log/log_common.h" #endif #ifndef commend_dll_h #include "commend/commend_dll.h" #endif #ifdef __cplusplus extern "C" { #endif /*e \mainpage * COMMEND - COMMunication ENDpoint layer * * COMMEND provides a basic end to end communication model. Using * COMMEND services, the user creates readers & writers and * sets up communication channels among them, each with possibly * different types of QoS (in accordance with the RTPS protocol). * * The following two concepts form the core of the COMMEND layer: * \li Reader and writer services * \li Listeners * * COMMEND provides \e reader \e services to add readers to the network. * Reader services make it possible to create and delete readers, and * assert and remove remote writers for a given reader. By asserting * a remote writer for a given reader, the user specifies this reader * can expect to receive data from that particular writer and thereby * defines a communication channel. * * Similarly, COMMEND provides \e writer \e services to add writers * to the network. Each writer can have multiple remote readers to * send data to. When issuing a writer send command, the data passed * will be sent to all its readers. * * Different reader and writer services exist depending on the intended * QoS of the reader or writer the user wants to create. With a best effort * reader service, the user can add best effort readers to the network. * Strict reliable readers require a strict reliable reader service. * Multiple instances of either service can coexist in the same * application. * * Listeners handle the callbacks associated with both readers and writers. * Each reader or writer is associated with a reader or writer listener * respectively upon creation. * The listener contains the callback routines that will be executed for * the associated reader or writer when well defined events occur, such as * the arrival of data for a reader. The type of listener used, and therefore * the types of callbacks supported, depends upon the desired QoS of the * reader or writer. * * COMMEND implements the behavioral aspects of the RTPS protocol, i.e. * it knows the valid sequences to send and receive submessages and the * proper way to respond to submessages. * For example, a COMMEND reader understands how to respond to a * HEARTBEAT message. * Similarly, a strict reliable writer knows how to periodically * send a HEARTBEAT and that it needs to resend data when a NACK is * received in response to a HEARTBEAT. * * COMMEND does not store any data, however. That is, in order to resend * an issue, it must inquire and receive this data again from the * user of the API, typically the PRESENTATION layer. This is achieved * using the callback mechanism. * Similarly, upon receiving new data, a callback for that reader will * pass the data on to the PRESENTATION layer. * * COMMEND does not know the wire representation of the different RTPS * submessages. It merely knows the parameters required to define and * interpret each submessage. The MIG layer handles the actual wire * representation. * * @see COMMENDReaderServiceModule COMMENDWriterServiceModule */ /*e \defgroup COMMENDModule COMMEND \ingroup NDDS */ /*e \defgroup COMMENDLogModule COMMENDLog * \ingroup COMMENDModule * NOTE: When a new submodule is added to commend, it must be given * a number and entered here. Because of the use of this id * for logging, there are 16 submodule id's: 0x1000, 0x2000, ... , 0xF000. * It is suggested we put the modules here in an order that * respects their dependencies: modules with a lower number * cannot depend on modules with a higher number. */ #define SUBMODULE_COMMEND_FRAG_SAMPLE_TABLE (0x1000) #define SUBMODULE_COMMEND_FACADE (0x2000) #define SUBMODULE_COMMEND_PASSIVE_FACADE (0x3000) #define SUBMODULE_COMMEND_ACTIVE_FACADE (0x4000) #define SUBMODULE_COMMEND_BE_WRITER_SERVICE (0x5000) #define SUBMODULE_COMMEND_BE_READER_SERVICE (0x6000) #define SUBMODULE_COMMEND_SR_WRITER_SERVICE (0x7000) #define SUBMODULE_COMMEND_SR_READER_SERVICE (0x8000) #define SUBMODULE_COMMEND_ANON_WRITER_SERVICE (0x9000) #define SUBMODULE_COMMEND_ANON_READER_SERVICE (0xA000) #define COMMEND_SUBMODULE_MASK_FRAG_SAMPLE_TABLE (0x0001) #define COMMEND_SUBMODULE_MASK_FACADE (0x0002) #define COMMEND_SUBMODULE_MASK_PASSIVE_FACADE (0x0004) #define COMMEND_SUBMODULE_MASK_ACTIVE_FACADE (0x0008) #define COMMEND_SUBMODULE_MASK_BE_WRITER_SERVICE (0x0010) #define COMMEND_SUBMODULE_MASK_BE_READER_SERVICE (0x0020) #define COMMEND_SUBMODULE_MASK_SR_WRITER_SERVICE (0x0040) #define COMMEND_SUBMODULE_MASK_SR_READER_SERVICE (0x0080) #define COMMEND_SUBMODULE_MASK_ANON_WRITER_SERVICE (0x0100) #define COMMEND_SUBMODULE_MASK_ANON_READER_SERVICE (0x0200) #define COMMEND_SUBMODULE_MASK_ALL RTI_LOG_SUBMODULE_MASK_ALL #ifdef __cplusplus } /* extern "C" */ #endif #endif /* commend_log_h */