|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Core fixed-width scalar typedefs and the PsyType / PsyContext hierarchical identifiers. More...
Go to the source code of this file.
Classes | |
| struct | PsyType |
| Hierarchical message type identifier — the key used for publish/subscribe matching in Psyclone. More... | |
| struct | PsyContext |
| Hierarchical execution-context identifier. More... | |
Macros | |
| #define | CNSPRIORITY 90 |
| #define | FACTORYPRIORITY 90 |
| #define | BITFREE 1 |
| #define | BITOCCUPIED 0 |
| #define | INT32_NOVALUE 0x12345678 |
| #define | INT64_NOVALUE 0x123456789ABCDEF0L |
| #define | FLOAT64_NOVALUE 0.123456789123456789 |
| #define | MAXVALUINT8 ((uint8)~((uint8)0)) |
| #define | MAXVALINT8 ((int8)(MAXVALUINT8 >> 1)) |
| #define | MAXVALUINT16 ((uint16)~((uint16)0)) |
| #define | MAXVALINT16 ((int16)(MAXVALUINT16 >> 1)) |
| #define | MAXVALUINT32 ((uint32)~((uint32)0)) |
| #define | MAXVALINT32 ((int32)(MAXVALUINT32 >> 1)) |
| #define | MAXVALUINT64 ((uint64)~((uint64)0)) |
| #define | MAXVALINT64 ((int64)(MAXVALUINT64 >> 1)) |
| #define | MERGEUINT3264(a, b) |
| #define | GET1UINT3264(a) |
| #define | GET2UINT3264(a) |
| #define | MERGEUINT1632(a, b) |
| #define | GET1UINT1632(a) |
| #define | GET2UINT1632(a) |
| #define | PSYTYPELEVELS 16 |
| Number of hierarchy levels in a PsyType. | |
| #define | PSYCONTEXTLEVELS 16 |
| Number of hierarchy levels in a PsyContext. | |
| #define | CONTEXT_OTHER_ROOT 0 |
| compare(): the contexts differ already at the root level. | |
| #define | CONTEXT_EQUAL 1 |
| compare(): the contexts are equal (up to wildcards). | |
| #define | CONTEXT_SUPERSEDES 2 |
| compare(): this context is more specific than / supersedes the other. | |
| #define | CONTEXT_INCLUDED 3 |
| compare(): this context is more general and includes the other. | |
Variables | |
| static struct PsyType | NOTYPE = { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } |
| The empty/unset message type (isValid() == false). | |
| static struct PsyContext | NOCONTEXT = { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } |
| The empty/unset context (isValid() == false). | |
Core fixed-width scalar typedefs and the PsyType / PsyContext hierarchical identifiers.
This file defines the CMSDK-wide, architecture-independent integer and floating point types (int8..int64, uint8..uint64, float32/float64) selected via the ARCH_32 / ARCH_64 build defines, plus the two central hierarchical identifier structs used throughout Psyclone: PsyType (message types) and PsyContext (execution contexts). Both structs are plain fixed-size PODs so they can be embedded directly in wire/shared-memory structures such as DataMessageHeader.
PLATFORM DIFFERENCES: on 64-bit builds, Windows maps int64/uint64 to (unsigned) long long while other platforms use int64_t/uint64_t from <cstdint>; the sizes are identical, only the underlying compiler types (and hence printf format expectations) differ — which is also why the -Wformat warning is suppressed on non-Windows GCC builds.
Definition in file Types.h.
| #define BITFREE 1 |
Definition at line 33 of file Types.h.
Referenced by cmlabs::MemoryRequestQueues::CloseRequest(), cmlabs::GenericMemoryMap< T, ID >::DeleteEntry(), cmlabs::utils::GetFirstFreeBitLocN(), and cmlabs::utils::UnitTest_Utils().
| #define BITOCCUPIED 0 |
Definition at line 34 of file Types.h.
Referenced by cmlabs::MemoryRequestQueues::AddNewRequest(), cmlabs::GenericMemoryMap< T, ID >::CreateEntry(), cmlabs::GenericMemoryMap< T, ID >::CreateFirstFreeEntry(), cmlabs::ThreadManager::createThread(), cmlabs::MemoryRequestQueues::InitRequestMap(), cmlabs::TemporalMemory::insertMessage(), and cmlabs::utils::UnitTest_Utils().
| #define CONTEXT_EQUAL 1 |
compare(): the contexts are equal (up to wildcards).
Definition at line 407 of file Types.h.
Referenced by PsyContext::compare().
| #define CONTEXT_INCLUDED 3 |
compare(): this context is more general and includes the other.
Definition at line 409 of file Types.h.
Referenced by PsyContext::compare().
| #define CONTEXT_OTHER_ROOT 0 |
compare(): the contexts differ already at the root level.
Definition at line 406 of file Types.h.
Referenced by PsyContext::compare().
| #define CONTEXT_SUPERSEDES 2 |
compare(): this context is more specific than / supersedes the other.
Definition at line 408 of file Types.h.
Referenced by PsyContext::compare().
| #define FLOAT64_NOVALUE 0.123456789123456789 |
Definition at line 81 of file Types.h.
Referenced by cmlabs::MessageIndex::queryMessages(), and cmlabs::PsyAPI::retrieveFloatParam().
| #define GET1UINT1632 | ( | a | ) |
| #define GET1UINT3264 | ( | a | ) |
| #define GET2UINT3264 | ( | a | ) |
| #define INT64_NOVALUE 0x123456789ABCDEF0L |
Definition at line 80 of file Types.h.
Referenced by cmlabs::MessageIndex::queryMessages(), and cmlabs::PsyAPI::retrieveIntegerParam().
| #define MAXVALINT16 ((int16)(MAXVALUINT16 >> 1)) |
| #define MAXVALINT32 ((int32)(MAXVALUINT32 >> 1)) |
| #define MAXVALINT64 ((int64)(MAXVALUINT64 >> 1)) |
| #define MAXVALINT8 ((int8)(MAXVALUINT8 >> 1)) |
| #define MAXVALUINT16 ((uint16)~((uint16)0)) |
Definition at line 85 of file Types.h.
Referenced by cmlabs::utils::GetFirstFreeBitLocN(), and cmlabs::utils::SetBitN().
| #define MAXVALUINT32 ((uint32)~((uint32)0)) |
Definition at line 87 of file Types.h.
Referenced by cmlabs::DataMessage::DataMessage(), cmlabs::DataMessage::DataMessage(), cmlabs::RequestGateway::getBestExecutorID(), cmlabs::utils::GetFirstFreeBitLocN(), cmlabs::PsySpace::PsySpace(), cmlabs::utils::SetBitN(), and cmlabs::WebsocketData::setData().
| #define MERGEUINT1632 | ( | a, | |
| b ) |
| #define MERGEUINT3264 | ( | a, | |
| b ) |
| #define PSYCONTEXTLEVELS 16 |
Number of hierarchy levels in a PsyContext.
Definition at line 267 of file Types.h.
Referenced by PsyContext::compare(), PsyContext::fromString(), PsyContext::matches(), PsyContext::operator<(), PsyContext::operator>(), PsyContext::operator[](), PsyContext::setLevel(), and PsyContext::toString().
| #define PSYTYPELEVELS 16 |
Number of hierarchy levels in a PsyType.
Definition at line 100 of file Types.h.
Referenced by PsyType::fromString(), PsyType::matches(), PsyType::operator<(), PsyType::operator>(), PsyType::operator[](), PsyType::setLevel(), PsyContext::toString(), PsyType::toString(), and PsyType::toString().
|
static |
The empty/unset context (isValid() == false).
Definition at line 437 of file Types.h.
Referenced by cmlabs::DataMessage::getContextChange(), cmlabs::PsyAPI::getCurrentTriggerContext(), cmlabs::Internal_Print(), and cmlabs::MessagePlayer::waitForNextMessage().
|
static |
The empty/unset message type (isValid() == false).
Definition at line 436 of file Types.h.
Referenced by cmlabs::DataMessage::getType(), cmlabs::PsyAPI::postOutputMessage(), and cmlabs::MessagePlayer::waitForNextMessage().