C-DEngine 5.105

TheThing Members

The TheThing type exposes the following members.

Constructors


  Name Description
Public method TheThing
Constructor of TheThing Creates the MyPropertyBag and Registered Event Tables

Methods


  Name Description
Public method AddCapability
Adds a Thing Capability to TheThing
Public method Static member ApplyPipelineConfigAsync
Public method ApplyThingConfigurationAsync
Public method ClearAllEvents
Removes all Events from TheThing
Public method ClearUpdateHistory
Frees up any history items that have already been returned at least once by a call to GetThingHistory. Call this when complete history is required and the history items have been successfully processed.
Public method CloneBase
Clonse an incoming object into this object
(Inherited from TheDataBase.)
Public method ClonePropertyValues
Clones all existing properties and sub-properties in to the given OutThing
Public method CloneThingAndPropertyMetaData
Clones all existing properties and sub-properties in to the given OutThing without setting any values (non-existent properties get a null value)
Public method CloneTo
Clones the metadata of the current class to a new class provided to the method
(Inherited from TheMetaDataBase.)
Public method Static member CreateThingFromConfigurationAsync
Public method Static member CreateThingPipelineFromConfigurationAsync
Public method CreateUX
This method is called by the NMI Service of the C-DEngine to initialize the NMI UX
Public method DeclareConfigProperty
Public method DeclareNMIProperty
Properties declared NMI properties will show up in the Property Table on NMI controls and Elements If the property does not exist, it will be created at runtime
Public method DeclareSecureProperty
This function allows to declare a secure Property Secure Properties are stored encrypted and can only be decrypted on nodes with the same ApplicationID and SecurityID. These properties are sent encrypted via the mesh. JavaScript clients CANNOT decrypt the value of the property!
Public method DeclareSensorProperty
Public method Delete
Deletes this thing and all its resources
Public method Equals(System.Object) (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FireEvent(String, ICDEThing, Object, Boolean)
Fires the given Event. Every TheThing can register and Fire any Event on any event. New Events can be defined at Runtime, registered and fired
Public method FireEvent(String, TheProcessMessage, Boolean, Int32)
Fire an Event on a property
(Inherited from TheDataBase.)
Public method FlushThrottle
Forces to Flush all Property Changes currently in the Throttle Queue
Public method Static member GeneratePipelineAnswerConfiguration
Creates a ThePipelineConfiguration that only contains the configuration values needed to specialize a pipeline instance. This is typically used an answer file that instantiates a thing pipeline.
Public method GetAllProperties()()()()
returns a list of all properties of TheThing Only top-level properties on TheThing will be returned. To return properties of properties, use the GetAllProperties(maxSubPropertylevel) override.
Public method GetAllProperties(Int32)
returns a list of all properties of TheThing and their sub-properties, up to the specified nesting level
Public method GetBaseEngine
Gets the BaseEngine of TheThing and caches it in TheThing - this is a performance optimization Tradeoff: TheThing will hold on to the Engine reference
Public method GetBaseThing
Returns the BaseThing of a Thing. TheBaseThing is a serializable representation of a Thing. the ICDEThing interface requires the return of TheBaseThing as other classes can be inherited from ICDEThing. In case of TheThing, this method just returns "this"
Public method GetHashCode (Inherited from Object.)
Public method GetHistoryParameters
Public method GetHistoryStore(Guid)
Public method GetHistoryStore<(Of <<'(T>)>>)(Guid)
Public method GetMatchingProperties
Returns the names of properties in this thing that match the provided inclusion and exclusion lists.
Public method GetNMIProperties
retrieves all properties that have bit 7 (64) set in cdeF
Public method GetObject
Return the internal "object" associated with this TheThing
Public method GetPropertiesMetaStartingWith(String)
Returns all properties where the cdeM Meta Field starts with pName Only properties directly attached to TheThing will be returned
Public method GetPropertiesMetaStartingWith(String, Boolean)
Returns all properties starting with a specific prefix
Public method GetPropertiesStartingWith
Returns a list of Properties starting with pName in the Name Only properties directly attached to TheThing will be returned
Public method GetProperty(String)
Returns a property of a given Name. If the property does not exist the method returns NULL
Public method GetProperty(String, Boolean)
Returns a cdeP Property Object
Public method GetPropertyType
Return the property type of a given property name. Returns ZERO if the property does not exist or the name is null/""
Public method Static member GetSafeProperty
Returns a safe value of a given property as an object. Return can be null
Public method Static member GetSafePropertyBool
Returns a (null) safe value of a given property as a boolean
Public method Static member GetSafePropertyDate
Returns a (null) safe value of a given property as DateTimeOffset
Public method Static member GetSafePropertyGuid
Returns a (null) safe value of a given property as a Guid
Public method Static member GetSafePropertyNumber
Returns a (null) safe value of a given property as double
Public method Static member GetSafePropertyString
Returns a (null) safe value of a given property as string
Public method Static member GetSafePropertyStringObject
Returns a (null) safe value of a given property as string
Public method Static member GetSafeThingGuid
Sets the ID of a TheThing (SetProperty(pGuidName+"_ID",newGuid>);
Public method GetSensorProperties
Returns all properties that are marked as Sensors.
Public method GetSensorPropertyMetaData
Public method GetSensorProviderProperties
Returns all properties that are marked as coming from a sensor provider.
Public method GetSensorProviderSubscriptionsAsync()()()()
Public method GetSensorProviderSubscriptionsAsync(TheThing..::..MsgGetSensorSubscriptions)
Public method GetSensorProviderSubscriptionsAsync(TheThing..::..MsgGetSensorSubscriptions, Boolean)
Public method GetThingConfigurationAsync(Boolean)
Public method GetThingConfigurationAsync(Boolean, Boolean)
Public method Static member GetThingDataSource
Returns the proper DataSource String for the given Thing
Public method GetThingHistory(Guid, Int32, Boolean)
Retrieves any available history items since the last time GetThingHistory was called.
Public method GetThingHistory(Guid, Int32, Boolean, Boolean%)
Retrieves any available history items since the last time GetThingHistory was called.
Public method GetThingHistoryAsync
Public method GetThingPipelineConfigurationAsync(Boolean)
Return the configurations for a TheThing and all the TheThing instances that depend on the thing, or that this TheThing depends on.
Public method GetThingPipelineConfigurationAsync(String, Boolean)
Return the configurations for a TheThing and all the TheThing instances that depend on the thing, or that this TheThing depends on.
Public method GetThingSubscriptionsAsync()()()()
Public method GetThingSubscriptionsAsync(TheThing..::..MsgGetThingSubscriptions)
Public method GetType (Inherited from Object.)
Public method Static member HandleByThing
Hands a given TSM to a given Thing
Public method HandleMessage
All messages sent to TheThing will routed through this message handler The handle Message of TheBaseThing will be excuted SYNCHRON
Public method HasRegisteredEvents
Returns true if the event specified exists in the Eventing System of TheThing
Public method Init
This method is called by TheThingService of the C-DEngine when the Thing is loaded or registered in TheThingRegistry
Public method IsEventRegistered
Returns true if the requested eThingEvents has registered callbacks
(Inherited from TheDataBase.)
Public method IsFromOwningRemoteNode
Returns true if originating node is the node that owns the Thing
Public method IsInit
Must return true if TheThing was already initialized
Public method IsOnLocalNode
Returns true if TheThing is managed on the current node
Public method IsUXInit
Must return true if the UX was already initialized
Public method Static member MemberGetSafeProperty
Public method Static member MemberGetSafePropertyBool
Public method Static member MemberGetSafePropertyDate
Public method Static member MemberGetSafePropertyGuid
Public method Static member MemberGetSafePropertyNumber
Public method Static member MemberGetSafePropertyString
Public method Static member MemberGetSafePropertyStringObject
Public method Static member MemberSetSafeProperty(ICDEThing, Object, ePropertyTypes, Boolean, String)
Public method Static member MemberSetSafeProperty(TheThing, Object, ePropertyTypes, Boolean, Boolean, String)
Public method Static member MemberSetSafePropertyBool
Public method Static member MemberSetSafePropertyDate
Public method Static member MemberSetSafePropertyGuid
Public method Static member MemberSetSafePropertyNumber
The MemberSet/Get functions are identical to the SetSafeProperty/GetSafeProperty functions, except that they get the property name from the calling member. They are used typically in the get{}/set{} methods of .Net Property declarations, for example:
C#
public bool MyProperty
{
  get { return MemberGetSafePropertyBool(MyBaseThing); }
}
In this example, the cdeP property name will be "MyProperty".
Public method Static member MemberSetSafePropertyString
Protected method MemberwiseClone (Inherited from Object.)
Public method NotifyMirror
If called from a derived class and the class was stored in a StorageMirror, this method will call the "NotifyOfUpdate" method in the StorageMirror to inform all Notification Clients that this record has changed. This is VERY Expensive! Do not call too often! This does not work with StorageMirrors that require a PostSalt (unique table name)
(Inherited from TheDataBase.)
Protected method OnPropertyChanged (Inherited from TheBindableBase.)
Public method ProviderBrowseSensorsAsync()()()()
Public method ProviderBrowseSensorsAsync(TheThing..::..MsgBrowseSensors)
Public method ProviderBrowseSensorsAsync(TheThing..::..MsgBrowseSensors, Boolean)
Public method RegisterEvent(String, Action<(Of <<'(ICDEThing, Object>)>>))
Registers a new Event with TheThing New Events can be registerd and Fired at Runtime
Public method RegisterEvent(String, Action<(Of <<'(Object, TheProcessMessage>)>>))
Register a callback that will be fired on a Property Event
(Inherited from TheDataBase.)
Public method RegisterEvent2
Register a callback that will be fired on a Property Event
(Inherited from TheDataBase.)
Public method RegisterForUpdateHistory(TheHistoryParameters)
Public method RegisterForUpdateHistory(Int32, TimeSpan, List<(Of <<'(String>)>>), List<(Of <<'(String>)>>), TimeSpan, Boolean, Boolean) Obsolete.
Gathers history for property changes to the TheThing according to the filters specified in the parameters. Returns a token that can be used to retrieve history items for the filter. Each independent consumer needs to obtain a token of their own. Tokens can be reused across restarts if permanent=true is specified. Otherwise a new token must be obtained after a restart. Tokens must be unregistered when the history filter is no longer needed in order to free up system resources, especially if the consumer was registered as permanent.
Public method RegisterForUpdateHistory<(Of <<'(T>)>>)(TheHistoryParameters)
Public method RegisterForUpdateHistory<(Of <<'(T>)>>)(TheHistoryParameters, TheStorageMirror<(Of <<'(T>)>>))
Public method RegisterOnChange
Registers a new OnPropertyChange Event Callback
Public method RegisterProperty
Registers a new property with TheThing at runtime
Public method RegisterStatusChanged
registers a function that is called when the StatusLevel of this Thing has changed
Public method RemovePropertiesStartingWith
Removes all properties with a given prefix from TheThing at Runtime Only properties directly attached to a thing will be deleted.
Public method RemoveProperty
Removes a property from TheThing at Runtime
Public method RestartUpdateHistory(Guid)
Restarts history retrieval from the point when ClearUpdateHistory was last called. Call this when complete history is required, and a failure during processing requires a retry. For durable history tokens, call this after a restart.
Public method RestartUpdateHistory(Guid, TheHistoryParameters)
Restarts history retrieval from the point when ClearUpdateHistory was last called. Call this when complete history is required, and a failure during processing requires a retry. For durable history tokens, call this after a restart.
Public method RestartUpdateHistory<(Of <<'(T>)>>)(Guid, TheHistoryParameters, TheStorageMirror<(Of <<'(T>)>>))
Restarts history retrieval from the point when ClearUpdateHistory was last called. Call this when complete history is required, and a failure during processing requires a retry. For durable history tokens, call this after a restart.
Public method SetBaseThing
Sets the BaseThing - only if the given pThing does not match "this"
Public method SetIThingObject
This method sets and internal "object" in TheThing. The object is NOT serialized in TheThingRegistry but can be used to store any arbitrary class/object associated with TheThing
Public method SetProperties
Sets multiple properties at once. Use with the Historian feature for a consistent snapshot that has all these property changes. If any of the properties do not exist, they will be created All Events (Change and Set) will be fired - even if the property has not changed The Property Type will be set as well
Public method SetProperty(String, Object)
Sets a property If the property does not exist, it will be created
Public method SetProperty(String, Object, ePropertyTypes)
Sets a property If the property does not exist, it will be created All Events (Change and Set) will be fired - even if the property has not changed The Property Type will be set as well
Public method SetProperty(String, Object, Int32, Action<(Of <<'(cdeP>)>>))
Sets a property If the property does not exist, it will be created
Public method SetProperty(String, Object, ePropertyTypes, Int32, Action<(Of <<'(cdeP>)>>))
Sets a property If the property does not exist, it will be created All Events (Change and Set) will be fired - even if the property has not changed The Property Type will be set as well
Public method SetProperty(String, Object, DateTimeOffset)
Sets a property If the property does not exist, it will be created The Property Type will be set as well
Public method SetProperty(String, Object, ePropertyTypes, DateTimeOffset)
Sets a property If the property does not exist, it will be created The Property Type will be set as well
Public method SetProperty(String, Object, ePropertyTypes, DateTimeOffset, Int32, Action<(Of <<'(cdeP>)>>))
Sets a property If the property does not exist, it will be created All Events (Change and Set) will be fired - even if the property has not changed The Property Type will be set as well
Protected method SetProperty``1(UMP%, UMP, Int32, Int32, String) (Inherited from TheBindableBase.)
Public method SetPropertyEvents(String, Boolean) Obsolete.
Turns event on/off on a Property. If the property does not exist, it will be created
Public method SetPropertyEvents(String, Boolean, Guid) Obsolete.
OBSOLETE: please dont use
Public method SetPropertyForceEvents
Sets a property If the property does not exist, it will be created All Events (Change and Set) will be fired - even if the property has not changed
Public method Static member SetPropertyFromBagItem
Sets a property from a "BagItem" - a "Name=Value" representation of a property
Public method SetPropertyNoEvents
Sets a property If the property does not exist, it will be created The Property Change Events and Set Property events are NOT Fired
Public method SetPropertyTypeOnly
Sets the type of a property If the property does not exist, it will be created
Public method SetPublishThrottle
sets a throttle time in milliseconds for all properties of TheThing. Changes to properties will only be sent at a maximum sample rate given in pThrottleInMs TheThing will consolidate all changes in one SETP call. If a property changes multiple times only the last value will be used.2
Public method Static member SetSafeProperty(ICDEThing, String, Object, ePropertyTypes, Boolean)
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TString"
Public method Static member SetSafeProperty(TheThing, String, Object, ePropertyTypes, Boolean, Boolean)
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TString"
Public method Static member SetSafePropertyBool
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TBoolean"
Public method Static member SetSafePropertyDate
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TDate"
Public method Static member SetSafePropertyGuid
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TGuid"
Public method Static member SetSafePropertyNumber
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TNumber"
Public method Static member SetSafePropertyString
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TString"
Public method SetSecureProperty
Sets a property If the property does not exist, it will be created
Public method SetStatus(Int32, String)
Convience method to set StatusLevel and LastMessage in one call. LastMessage will be prefixed with the current date/time. The message will also be logged in the C-DEngine EventLog.
Public method SetStatus(Int32, String, Guid)
Convience method to set StatusLevel and LastMessage in one call. LastMessage will be prefixed with the current date/time, using the session (user's) locale settings. The message will also be logged in the C-DEngine EventLog.
Public method SubscribeSensorsAsync(TheThing..::..MsgSubscribeSensors)
Public method SubscribeSensorsAsync(TheThing..::..MsgSubscribeSensors, Boolean)
Public method SubscribeSensorsAsync<(Of <<'(subscriptionT>)>>)(MsgSubscribeSensors<(Of <<'(subscriptionT>)>>))
Public method SubscribeSensorsAsync<(Of <<'(subscriptionT>)>>)(MsgSubscribeSensors<(Of <<'(subscriptionT>)>>), Boolean)
Public method SubscribeToThingAsync
Public method SubscribeToThingsAsync(IEnumerable<(Of <<'(TheThing..::..TheThingSubscription>)>>))
Public method SubscribeToThingsAsync(TheThing..::..MsgSubscribeToThings)
Public method ToString
Returns a string representation of TheThing cdeMID - The unique ID of TheThing
Public method UnregisterEvent(String, Action<(Of <<'(ICDEThing, Object>)>>))
Unregisters a callback for a given Event Name
Public method UnregisterEvent(String, Action<(Of <<'(Object, TheProcessMessage>)>>))
Unregister a previously registered callback
(Inherited from TheDataBase.)
Public method UnregisterEvent2
Unregister a previously registered callback
(Inherited from TheDataBase.)
Public method UnregisterStatusChanged
Unregisters a function that is called when the StatusLevel of this Thing has changed
Public method UnregisterUpdateHistory
Removes the history filter for the historyToken. Call this to free up system resources. Subsequent calls to any APIs with this token will fail.
Public method UnsubscribeFromAllThingsAsync
Public method UnsubscribeFromThingsAsync(IEnumerable<(Of <<'(Guid>)>>))
Public method UnsubscribeFromThingsAsync(TheThing..::..MsgUnsubscribeFromThings)
Public method UnsubscribeSensorsAsync(TheThing..::..MsgUnsubscribeSensors)
Public method UnsubscribeSensorsAsync(TheThing..::..MsgUnsubscribeSensors, Boolean)

Properties


  Name Description
Public property Address
Shortcut for "SetProperty("Address",value);
Public property Capabilities
Returns a list of capabilities of TheThing. Can be used to Build "Thing Models"
Public property cdeA
Access Level Mask 0=Everyone; 1=Untrusted Guest; 2=Trusted Guest; 4=Trusted Member1; 8=Trusted Member2; 16=Truested Member3; 32=Senior Member 1; 64=Senior Member 2; 128=Admin;
(Inherited from TheMetaDataBase.)
Public property cdeAVA
Availability of this record The higher this number the higher the availability of this record The Storage Service might store the data in multiple location to ensure maximum availability
(Inherited from TheDataBase.)
Public property cdeCTIM
Timestamp of this class. Will be set to DateTimeOffset.Now on creation of the Class
(Inherited from TheDataBase.)
Public property cdeEXP
Expiration in Seconds of the class If a derived class is stored in a StorageMirror and cdeEXP is set to>0, the StorageMirror will automatically delete this record after the time has passed
(Inherited from TheDataBase.)
Public property cdeF
Feature ID
(Inherited from TheMetaDataBase.)
Public property cdeM
The Cookie or Meta information for this class
(Inherited from TheMetaDataBase.)
Public property cdeMID
Unique Key for the class derived from TheDataBase. this will be used in the StorageService as the Unique Index in the SQL Tables
(Inherited from TheDataBase.)
Public property cdeN
Guid of Hosting Node - new in 4.108: Moved from MetaDataBase to here
(Inherited from TheDataBase.)
Public property cdeO
Owner Guid
(Inherited from TheMetaDataBase.)
Public property cdePendingConfig
Public property cdePRI
Priority of this record. A lower number means a higher priority. Data with higher priority will be retrieved faster than those with lower prio
(Inherited from TheDataBase.)
Public property cdeRequiresCustomConfig
Public property cdeSEQ
Sequence number
(Inherited from TheMetaDataBase.)
Public property cdeU
User ID owning this resource
(Inherited from TheMetaDataBase.)
Public property DeviceType
Shortcut for "SetProperty("DeviceType",value);
Public property EngineName
Shortcut for "SetProperty("EngineName",value);
Public property FriendlyName
Shortcut for "SetProperty("FriendlyName",value);
Public property HasLiveObject
A property representation of IsAlive() in order for easy serialization and UX display
Public property ID
Shortcut for "SetProperty("ID",value);
Public property InitializePendingStartTime
Indicates since when an Init() called has been started but not completed. Returns DateTimeOffset.MinValue if Init() has not been called or has completed.
Public property IsDisabled
Can be used to Quickly Disable a Thing. Shortcut for "SetProperty("IsDisable", value).
Public property IsHidden
The Thing will be running but does not show on the NMI ever. Shortcut for "SetProperty("IsHidden", value).
Public property IsInitialized
A property representation of IsInit() in order for easy serialization and UX display
Public property IsInitializing
Indicates if Init() has been called, but not completed.
Public property IsUXInitialized
A property representation of IsUXInit() in order for easy serialization and UX display
Public property LastMessage
Sets the last message of the Thing. This can be used for status, error or other messages. Shortcut for "SetProperty("LastMessage", value).
Public property LastUpdate
Shortcut for "SetProperty("LastUpdate",value);
Public property MyPropertyBag
The Main PropertyBag. ATTENTION: Direct Manipulation of MyPropertyBag will not fire any events and circumvents encryption and other API based management. Only access this Bag if you know exactly what you are doing. NOTE: It is possible that we remove access to the Bag in a later version of the C-DEngine - do not rely on its access availability
Public property Parent
Shortcut for "SetProperty("Parent",value);
Public property PropertyCount
Returns a count of all current Properties Only properties on TheThing will be counted.
Public property StatusLevel
Shortcut for "SetProperty("Status",value); 0=Not Running 1=OK 2=warning 3=Failure 4=Ramp Up 5=Engineering 6=Shutdown 7=Unknown/not visible
Public property UID
Shortcut for "SetProperty("UID",value);
Public property Value
Shortcut for "SetProperty("Value",value);
Public property Version
Shortcut for "SetProperty("Version",value);

Events


  Name Description
Public event PropertyChanged
Multicast event for property change notifications.
(Inherited from TheBindableBase.)