C-DEngine 5.105

TSM Fields

The TSM type exposes the following members.

Fields


  Name Description
Public field CST
Costing History of the Telegram
Public field ENG
Engine (Plugin-Service Class) name that owns this message
Public field FID
Serial Number of the Message. Do NOT set! This is managed by the C-DEngine
Public field FLG

16 Flags for the message each bit has impact on how the message is transported or interpreted The default is zero (Off) on all flags.

  • Bit 1(1) = Do not Relay this message - it wil only be sent to the next node (use SetDoNotRelay(true/false) and DoNotRelay())
  • Bit 2(2) = Unsubscribe the topics this message was sent with after the message was published (use SetUnsubscribeAfterPublish() and UnsubscribeAfterPublish())
  • Bit 3(4) = Send the Message only to the Cloud and devices connected to the cloud but not inside to any on-premise services (use SetToCloudOnly() and ToCloudOnly())
  • Bit 4(8) = Send this message to the Services (Data Provider) only. Messages with this flag are not sent to Client Nodes (Use SetToServiceOnly() and ToServiceOnly())
  • Bit 5(16) = Invers of Bit 4: Send this message to Client Nodes only. Messages with this flag are not sent to Service Nodes (use SetToNodesOnly() and ToNodesOnly())
  • Bit 6(32) = A message can be processed by multiple nodes. You can set this flag to tell later nodes that this message has been processed already (Use SetWasProcessed() and WasProcessed())
  • Bit 7(64) = Similar to Bit6, this bit can be used by plug-ins for any custom use, recommendation is to use it for reply-messages to ack signaling (use SetAcknowledged() and Acknowledged())
  • Bit 8(128) = Messages with this Flag set are only sent to the first Relay and not beyond. In most cases this is the FirstNode the current node is connected to (use SetToRelayOnly() and ToRelayOnly)
  • Bit 9(256) = Messages are placed in a Queue to be sent to the next nodes. If this flag is set, the message will NOT be placed in the Queue if it is already in the queue. Only the FIRST message found will be sent and later ones are discarded. The Message Hash is used to check if a message was found in the Queue. See GetHash() - (use SetNotToSendAgain() and NotToSendAgain())
  • Bit 10(512) = Similar to bit 9 a message this flag is used to only send one message. In opposite to Bit9, this flag ensures that only the LATEST message is sent (use SetNoDuplicates() and NoDuplicates())
  • Bit 11(1024) = Enable Pulse Mode. If this bit is enabled, the Sender and Receiver switch to Adrenalin mode and try to speed up communication. Active Nodes immediately initiate another request to the connected node (Use SetSendPulse and SendPulse)
  • Bit 12(2048) = If is set if a Message was relayed over a cloud node. Only ready this bit, it wil be set by the C-DEngine automatically on the Cloud Node
  • Bit 13(4096) = WRITE-ONLY: This Flag tells the C-DEngine to Encrypt the PLS when the message is sent and automatically decrypted when it is received and before its sent to the "ProcessIncomingMessage" handler (use EncryptPLS())
  • Bit 14(8192) = READ-ONLY: This flag can be read to determine if the PLS is encrypted (Use IsPLSEncrypted())
  • Bit 15 and 16 are reserved for future use
Public field GRO
The GRO contains the reverse route back to the originator of a message. Nodes will try to send the message back along the route to the originator skipping other nodes in the mesh. If GRO is empty, the normal mesh publishing rules apply.
Public field LVL
Message Content Level (see eMsgLevels)
Public field ORG
List of Originators of the Message separated by ; The first entry is always the "Birth" place or "Originator" of the message. The first entry can also optionally include the identifier (cdeMID) of the originating thing, which can be used to send a reply to the originator via TheCommCore.PublishToOriginator. The Last entry is always the "LastRelay" to transmit the message and is also seen as the "FirstNode" (from the point of view of the receiver) Note: The ORG field should not be manipulated or parsed directly, but only through the *Originator* methods on the TSM class.
Public field OWN
The Thing Owner of the Message - should match the cdeO Meta Property
Public field PLB
Payload Binary of the Message. If PLB is NULL and PLS is set, the PLS will be compressed to binary and put in PLB for footprint reduction. If PLB is not NULL and PLS is NULL the C-DEngine will assume that the PLB contains a compressed string and uncompresses PLB to PLS automatically during receiving. If you want to send a custom PLB binary blob, set PLS to some description of the PLB content.
Public field PLS
String Payload of the Message. In oposite to the TXT this string has no character limit
Public field QDX
Queue Priority The Lower the number the higher the priority of the telegram Default is 5 QDX=0 will NOT be relayed via a cloud node and is reserved for real-time service-to-service communication between on-premise nodes
Public field SEID
Session ID corresponding to this message. DO NOT SET! The C-DEngine is managing this value This parameter is NEVER sent to a JSON/HTML5 client
Public field SID
Scrambled Scope ID of this message. use TheCommonUtils.GetScrambledScopeID() to set this field This parameter is NEVER sent to a JSON/HTML5 client
Public field TIM
Timestamp of the Message. Will be set to DateTimeOffset.Now on creation of the message but can be overwritten
Public field TXT
Text of the Message - used for Commands or other short message strings Maximum length for transmission is 476 Characters!
Public field UID
User GUID of this message. Can be used to validate messages on other nodes against centrally managed users This parameter is NEVER sent to a JSON/HTML5 client