/* * (c) Copyright, Real-Time Innovations, 2020-2024. * 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 osapi_rtpsGuid_h #define osapi_rtpsGuid_h #include "osapi/osapi_dll.h" #include "osapi/osapi_type.h" #ifdef __cplusplus extern "C" { #endif /** @internal \ingroup RTIOsapiRtpsGuid * Those structures are needed in the activityContext in order to log and * compare the guid. They are reused in: /mig.2.0/interface/rtps.ifc */ /** @internal \ingroup RTIOsapiRtpsGuid * Guid Prefix */ struct RTIOsapiRtpsGuidPrefix { RTI_UINT32 hostId; RTI_UINT32 appId; RTI_UINT32 instanceId; }; #define RTI_OSAPI_RTPS_HOST_ID_UNKNOWN 0x00000000 #define RTI_OSAPI_RTPS_APP_ID_UNKNOWN 0x00000000 #define RTI_OSAPI_RTPS_INSTANCE_ID_UNKNOWN 0x00000000 #define RTI_OSAPI_RTPS_GUID_PREFIX_UNKNOWN \ { \ RTI_OSAPI_RTPS_HOST_ID_UNKNOWN, \ RTI_OSAPI_RTPS_APP_ID_UNKNOWN, \ RTI_OSAPI_RTPS_INSTANCE_ID_UNKNOWN \ } /** @internal \ingroup RTIOsapiRtpsGuid * Guid */ struct RTIOsapiRtpsGuid { struct RTIOsapiRtpsGuidPrefix prefix; RTI_UINT32 objectId; }; #define RTI_OSAPI_RTPS_OBJECT_ID_UNKNOWN 0x00000000 #define RTI_OSAPI_RTPS_GUID_UNKNOWN \ { \ RTI_OSAPI_RTPS_GUID_PREFIX_UNKNOWN, RTI_OSAPI_RTPS_OBJECT_ID_UNKNOWN \ } /** @internal \ingroup RTIOsapiRtpsGuid * @brief Check if two RTIOsapiPrefix are equal. * @param a \In. RTIOsapiPrefix a * @param b \In. RTIOsapiPrefix b * @return RTI_TRUE if the RTIOsapiPrefix are equal. */ extern RTIOsapiDllExport RTIBool RTIOsapiRtpsGuidPrefix_equals( const struct RTIOsapiRtpsGuidPrefix *a, const struct RTIOsapiRtpsGuidPrefix *b); /** @internal \ingroup RTIOsapiRtpsGuid * @brief Check if two RTIOsapiRtpsGuid are equal. * @param a \In. RTIOsapiRtpsGuid a * @param b \In. RTIOsapiRtpsGuid b * @return RTI_TRUE if the RTIOsapiRtpsGuid are equal. */ extern RTIOsapiDllExport RTIBool RTIOsapiRtpsGuid_equals( const struct RTIOsapiRtpsGuid *a, const struct RTIOsapiRtpsGuid *b); /** @internal \ingroup RTIOsapiRtpsGuid * @brief Copy the guid prefix. * @param a \In. RTIOsapiRtpsGuidPrefix * @param b \In. RTIOsapiRtpsGuidPrefix */ extern RTIOsapiDllExport void RTIOsapiRtpsGuidPrefix_copy( struct RTIOsapiRtpsGuidPrefix *to, struct RTIOsapiRtpsGuidPrefix *from); /** @internal \ingroup RTIOsapiRtpsGuid * @brief Copy the guid. * @param a \In. RTIOsapiRtpsGuid * @param b \In. RTIOsapiRtpsGuid */ extern RTIOsapiDllExport void RTIOsapiRtpsGuid_copy( struct RTIOsapiRtpsGuid *to, struct RTIOsapiRtpsGuid *from); #ifdef __cplusplus } /* extern "C" */ #endif #include "osapi/osapi_rtpsGuid_impl.h" #endif /* osapi_rtpsGuid_h */