TheThing Members
The TheThing type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TheThing |
Constructor of TheThing
Creates the MyPropertyBag and Registered Event Tables
|
Methods
Name | Description | |
---|---|---|
AddCapability |
Adds a Thing Capability to TheThing
|
|
ApplyPipelineConfigAsync | ||
ApplyThingConfigurationAsync | ||
ClearAllEvents |
Removes all Events from TheThing
|
|
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.
|
|
CloneBase |
Clonse an incoming object into this object
(Inherited from TheDataBase.) |
|
ClonePropertyValues |
Clones all existing properties and sub-properties in to the given OutThing
|
|
CloneThingAndPropertyMetaData |
Clones all existing properties and sub-properties in to the given OutThing without setting any values (non-existent properties get a null value)
|
|
CloneTo |
Clones the metadata of the current class to a new class provided to the method
(Inherited from TheMetaDataBase.) |
|
CreateThingFromConfigurationAsync | ||
CreateThingPipelineFromConfigurationAsync | ||
CreateUX |
This method is called by the NMI Service of the C-DEngine to initialize the NMI UX
|
|
DeclareConfigProperty | ||
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
|
|
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!
|
|
DeclareSensorProperty | ||
Delete |
Deletes this thing and all its resources
|
|
Equals(System.Object) | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
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
|
|
FireEvent(String, TheProcessMessage, Boolean, Int32) |
Fire an Event on a property
(Inherited from TheDataBase.) |
|
FlushThrottle |
Forces to Flush all Property Changes currently in the Throttle Queue
|
|
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.
|
|
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.
|
|
GetAllProperties(Int32) |
returns a list of all properties of TheThing and their sub-properties, up to the specified nesting level
|
|
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
|
|
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"
|
|
GetHashCode | (Inherited from Object.) | |
GetHistoryParameters | ||
GetHistoryStore(Guid) | ||
GetHistoryStore<(Of <<'(T>)>>)(Guid) | ||
GetMatchingProperties |
Returns the names of properties in this thing that match the provided inclusion and exclusion lists.
|
|
GetNMIProperties |
retrieves all properties that have bit 7 (64) set in cdeF
|
|
GetObject |
Return the internal "object" associated with this TheThing
|
|
GetPropertiesMetaStartingWith(String) |
Returns all properties where the cdeM Meta Field starts with pName
Only properties directly attached to TheThing will be returned
|
|
GetPropertiesMetaStartingWith(String, Boolean) |
Returns all properties starting with a specific prefix
|
|
GetPropertiesStartingWith |
Returns a list of Properties starting with pName in the Name
Only properties directly attached to TheThing will be returned
|
|
GetProperty(String) |
Returns a property of a given Name. If the property does not exist the method returns NULL
|
|
GetProperty(String, Boolean) |
Returns a cdeP Property Object
|
|
GetPropertyType |
Return the property type of a given property name. Returns ZERO if the property does not exist or the name is null/""
|
|
GetSafeProperty |
Returns a safe value of a given property as an object. Return can be null
|
|
GetSafePropertyBool |
Returns a (null) safe value of a given property as a boolean
|
|
GetSafePropertyDate |
Returns a (null) safe value of a given property as DateTimeOffset
|
|
GetSafePropertyGuid |
Returns a (null) safe value of a given property as a Guid
|
|
GetSafePropertyNumber |
Returns a (null) safe value of a given property as double
|
|
GetSafePropertyString |
Returns a (null) safe value of a given property as string
|
|
GetSafePropertyStringObject |
Returns a (null) safe value of a given property as string
|
|
GetSafeThingGuid |
Sets the ID of a TheThing (SetProperty(pGuidName+"_ID",newGuid>);
|
|
GetSensorProperties |
Returns all properties that are marked as Sensors.
|
|
GetSensorPropertyMetaData | ||
GetSensorProviderProperties |
Returns all properties that are marked as coming from a sensor provider.
|
|
GetSensorProviderSubscriptionsAsync()()()() | ||
GetSensorProviderSubscriptionsAsync(TheThing..::..MsgGetSensorSubscriptions) | ||
GetSensorProviderSubscriptionsAsync(TheThing..::..MsgGetSensorSubscriptions, Boolean) | ||
GetThingConfigurationAsync(Boolean) | ||
GetThingConfigurationAsync(Boolean, Boolean) | ||
GetThingDataSource |
Returns the proper DataSource String for the given Thing
|
|
GetThingHistory(Guid, Int32, Boolean) |
Retrieves any available history items since the last time GetThingHistory was called.
|
|
GetThingHistory(Guid, Int32, Boolean, Boolean%) |
Retrieves any available history items since the last time GetThingHistory was called.
|
|
GetThingHistoryAsync | ||
GetThingPipelineConfigurationAsync(Boolean) |
Return the configurations for a TheThing and all the TheThing instances that depend on the thing, or that this TheThing depends on.
|
|
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.
|
|
GetThingSubscriptionsAsync()()()() | ||
GetThingSubscriptionsAsync(TheThing..::..MsgGetThingSubscriptions) | ||
GetType | (Inherited from Object.) | |
HandleByThing |
Hands a given TSM to a given Thing
|
|
HandleMessage |
All messages sent to TheThing will routed through this message handler
The handle Message of TheBaseThing will be excuted SYNCHRON
|
|
HasRegisteredEvents |
Returns true if the event specified exists in the Eventing System of TheThing
|
|
Init |
This method is called by TheThingService of the C-DEngine when the Thing is loaded or registered in TheThingRegistry
|
|
IsEventRegistered |
Returns true if the requested eThingEvents has registered callbacks
(Inherited from TheDataBase.) |
|
IsFromOwningRemoteNode |
Returns true if originating node is the node that owns the Thing
|
|
IsInit |
Must return true if TheThing was already initialized
|
|
IsOnLocalNode |
Returns true if TheThing is managed on the current node
|
|
IsUXInit |
Must return true if the UX was already initialized
|
|
MemberGetSafeProperty | ||
MemberGetSafePropertyBool | ||
MemberGetSafePropertyDate | ||
MemberGetSafePropertyGuid | ||
MemberGetSafePropertyNumber | ||
MemberGetSafePropertyString | ||
MemberGetSafePropertyStringObject | ||
MemberSetSafeProperty(ICDEThing, Object, ePropertyTypes, Boolean, String) | ||
MemberSetSafeProperty(TheThing, Object, ePropertyTypes, Boolean, Boolean, String) | ||
MemberSetSafePropertyBool | ||
MemberSetSafePropertyDate | ||
MemberSetSafePropertyGuid | ||
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); } } |
|
MemberSetSafePropertyString | ||
MemberwiseClone | (Inherited from Object.) | |
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.) |
|
OnPropertyChanged | (Inherited from TheBindableBase.) | |
ProviderBrowseSensorsAsync()()()() | ||
ProviderBrowseSensorsAsync(TheThing..::..MsgBrowseSensors) | ||
ProviderBrowseSensorsAsync(TheThing..::..MsgBrowseSensors, Boolean) | ||
RegisterEvent(String, Action<(Of <<'(ICDEThing, Object>)>>)) |
Registers a new Event with TheThing
New Events can be registerd and Fired at Runtime
|
|
RegisterEvent(String, Action<(Of <<'(Object, TheProcessMessage>)>>)) |
Register a callback that will be fired on a Property Event
(Inherited from TheDataBase.) |
|
RegisterEvent2 |
Register a callback that will be fired on a Property Event
(Inherited from TheDataBase.) |
|
RegisterForUpdateHistory(TheHistoryParameters) | ||
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.
|
|
RegisterForUpdateHistory<(Of <<'(T>)>>)(TheHistoryParameters) | ||
RegisterForUpdateHistory<(Of <<'(T>)>>)(TheHistoryParameters, TheStorageMirror<(Of <<'(T>)>>)) | ||
RegisterOnChange |
Registers a new OnPropertyChange Event Callback
|
|
RegisterProperty |
Registers a new property with TheThing at runtime
|
|
RegisterStatusChanged |
registers a function that is called when the StatusLevel of this Thing has changed
|
|
RemovePropertiesStartingWith |
Removes all properties with a given prefix from TheThing at Runtime
Only properties directly attached to a thing will be deleted.
|
|
RemoveProperty |
Removes a property from TheThing at Runtime
|
|
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.
|
|
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.
|
|
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.
|
|
SetBaseThing |
Sets the BaseThing - only if the given pThing does not match "this"
|
|
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
|
|
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
|
|
SetProperty(String, Object) |
Sets a property
If the property does not exist, it will be created
|
|
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
|
|
SetProperty(String, Object, Int32, Action<(Of <<'(cdeP>)>>)) |
Sets a property
If the property does not exist, it will be created
|
|
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
|
|
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
|
|
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
|
|
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
|
|
SetProperty``1(UMP%, UMP, Int32, Int32, String) | (Inherited from TheBindableBase.) | |
SetPropertyEvents(String, Boolean) | Obsolete.
Turns event on/off on a Property. If the property does not exist, it will be created
|
|
SetPropertyEvents(String, Boolean, Guid) | Obsolete.
OBSOLETE: please dont use
|
|
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
|
|
SetPropertyFromBagItem |
Sets a property from a "BagItem" - a "Name=Value" representation of a property
|
|
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
|
|
SetPropertyTypeOnly |
Sets the type of a property
If the property does not exist, it will be created
|
|
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
|
|
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"
|
|
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"
|
|
SetSafePropertyBool |
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TBoolean"
|
|
SetSafePropertyDate |
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TDate"
|
|
SetSafePropertyGuid |
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TGuid"
|
|
SetSafePropertyNumber |
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TNumber"
|
|
SetSafePropertyString |
A type/null save helper to Store a Numeric value in a given property. The target property type will be set to "TString"
|
|
SetSecureProperty |
Sets a property
If the property does not exist, it will be created
|
|
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.
|
|
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.
|
|
SubscribeSensorsAsync(TheThing..::..MsgSubscribeSensors) | ||
SubscribeSensorsAsync(TheThing..::..MsgSubscribeSensors, Boolean) | ||
SubscribeSensorsAsync<(Of <<'(subscriptionT>)>>)(MsgSubscribeSensors<(Of <<'(subscriptionT>)>>)) | ||
SubscribeSensorsAsync<(Of <<'(subscriptionT>)>>)(MsgSubscribeSensors<(Of <<'(subscriptionT>)>>), Boolean) | ||
SubscribeToThingAsync | ||
SubscribeToThingsAsync(IEnumerable<(Of <<'(TheThing..::..TheThingSubscription>)>>)) | ||
SubscribeToThingsAsync(TheThing..::..MsgSubscribeToThings) | ||
ToString |
Returns a string representation of TheThing cdeMID - The unique ID of TheThing
|
|
UnregisterEvent(String, Action<(Of <<'(ICDEThing, Object>)>>)) |
Unregisters a callback for a given Event Name
|
|
UnregisterEvent(String, Action<(Of <<'(Object, TheProcessMessage>)>>)) |
Unregister a previously registered callback
(Inherited from TheDataBase.) |
|
UnregisterEvent2 |
Unregister a previously registered callback
(Inherited from TheDataBase.) |
|
UnregisterStatusChanged |
Unregisters a function that is called when the StatusLevel of this Thing has changed
|
|
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.
|
|
UnsubscribeFromAllThingsAsync | ||
UnsubscribeFromThingsAsync(IEnumerable<(Of <<'(Guid>)>>)) | ||
UnsubscribeFromThingsAsync(TheThing..::..MsgUnsubscribeFromThings) | ||
UnsubscribeSensorsAsync(TheThing..::..MsgUnsubscribeSensors) | ||
UnsubscribeSensorsAsync(TheThing..::..MsgUnsubscribeSensors, Boolean) |
Properties
Name | Description | |
---|---|---|
Address |
Shortcut for "SetProperty("Address",value);
|
|
Capabilities |
Returns a list of capabilities of TheThing. Can be used to Build "Thing Models"
|
|
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.) |
|
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.) |
|
cdeCTIM |
Timestamp of this class. Will be set to DateTimeOffset.Now on creation of the Class
(Inherited from TheDataBase.) |
|
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.) |
|
cdeF |
Feature ID
(Inherited from TheMetaDataBase.) |
|
cdeM |
The Cookie or Meta information for this class
(Inherited from TheMetaDataBase.) |
|
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.) |
|
cdeN |
Guid of Hosting Node - new in 4.108: Moved from MetaDataBase to here
(Inherited from TheDataBase.) |
|
cdeO |
Owner Guid
(Inherited from TheMetaDataBase.) |
|
cdePendingConfig | ||
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.) |
|
cdeRequiresCustomConfig | ||
cdeSEQ |
Sequence number
(Inherited from TheMetaDataBase.) |
|
cdeU |
User ID owning this resource
(Inherited from TheMetaDataBase.) |
|
DeviceType |
Shortcut for "SetProperty("DeviceType",value);
|
|
EngineName |
Shortcut for "SetProperty("EngineName",value);
|
|
FriendlyName |
Shortcut for "SetProperty("FriendlyName",value);
|
|
HasLiveObject |
A property representation of IsAlive() in order for easy serialization and UX display
|
|
ID |
Shortcut for "SetProperty("ID",value);
|
|
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.
|
|
IsDisabled |
Can be used to Quickly Disable a Thing. Shortcut for "SetProperty("IsDisable", value).
|
|
IsHidden |
The Thing will be running but does not show on the NMI ever. Shortcut for "SetProperty("IsHidden", value).
|
|
IsInitialized |
A property representation of IsInit() in order for easy serialization and UX display
|
|
IsInitializing |
Indicates if Init() has been called, but not completed.
|
|
IsUXInitialized |
A property representation of IsUXInit() in order for easy serialization and UX display
|
|
LastMessage |
Sets the last message of the Thing. This can be used for status, error or other messages. Shortcut for "SetProperty("LastMessage", value).
|
|
LastUpdate |
Shortcut for "SetProperty("LastUpdate",value);
|
|
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
|
|
Parent |
Shortcut for "SetProperty("Parent",value);
|
|
PropertyCount |
Returns a count of all current Properties
Only properties on TheThing will be counted.
|
|
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
|
|
UID |
Shortcut for "SetProperty("UID",value);
|
|
Value |
Shortcut for "SetProperty("Value",value);
|
|
Version |
Shortcut for "SetProperty("Version",value);
|
Events
Name | Description | |
---|---|---|
PropertyChanged |
Multicast event for property change notifications.
(Inherited from TheBindableBase.) |