C-DEngine 5.105

IBaseEngine Methods

The IBaseEngine type exposes the following members.

Methods


  Name Description
Public method AddCapability
Adds a capability to the plugin. Can be requested by another plugin to see if compatible behavior is avaiable.
Public method AddManifestFiles
Adds a list of all files that belong to a plugin.
Public method AddPlatforms
Adds a platforms supported by the plugin
Public method Equals(System.Object) (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FireEvent
New in V3.0: allows to fire an event on this engine (short for this.GetBaseThing().FireEvent() but verifies that the BaseThing is valid and active)
Public method GetBaseEngine
New in V4.0083: Returns TheBaseEngine Object assosicated with this Interface
Public method GetBaseThing
New in V3.0: Returns TheThing of this Engine
Public method GetCDEMinVersion
Returns the minimim version of the C-DEngine required by the plug-in as set with SetCDEMinVersion.
Public method GetCommunicationCosts
The C-DEngine is tracking the communication costs of all telegrams going through a plugin-service. This methods allows to retrieve the currently recorded communication costs since the start of the service.
Public method GetDashboard
Returns the string of the main NMI Dashboard of the plugin-service
Public method GetDashboardGuid
Returns the Guid of the main NMI Dashboard of the plugin-service
Public method GetDeviceTypes
Gets the device types supported by this Plugin-Service
Public method GetEngineID
retrieves the unique ID of the Engine given by the SetEngineID call
Public method GetEngineName
Returns the ClassName of the plugin-service set with the "SetEngineName" call.
Public method GetEngineState
Returns the current state of this Engine (Service Plugin)
Public method GetFirstNode
Returns the Guid (DeviceID) of currently active Channel the Engine is connected to If the plugin-service is a Multi-Channel one active channels is returned
Public method GetFriendlyName
Retrieves the friendly name of the Plugin-Service
Public method GetHashCode (Inherited from Object.)
Public method GetISOLater
Return the current ISOLater Object of the Base Engine.
Public method GetPluginInfo
Returns the plugin info of this Plugin/Service
Public method GetPluginResource(String)
Returns a stream for the requested Resource The Resource Name can be case insensitive
Public method GetPluginResource(TheRequestData)
Returns a stream for the requested Resource and inserts it into TheRequestData. If TheRequestData contains a SessionState and its LCID is not zero, the function tries to load it first from the /ClientBin/{LCID}/... branch This function also sets the MimeType and the StatePush variable. The Resource Name is case insensitive
Public method GetThingInterface
New in V3.0: Returns the ICDEThing of this Engine
Public method GetType (Inherited from Object.)
Public method GetVersion
Returns the version set with "SetVersion"
Public method HasCapability
Checks if a Plugin has the requested eThingsCapability
Public method HasChannels
RETIRED IN V4: DO NOT USE - ALWAYS RETURNS FALSE
Public method InitAndSubscribe
Sends CDE_INITIALIZE either to all nodes in order to find the proper service to handle Data Requests
Protected method MemberwiseClone (Inherited from Object.)
Public method MessageProcessed
call this method to trigger the MessageProcessed events.
Public method ProcessInitialized
Call this method to tell the C-DEngine that the service was initialized.
Public method ProcessMessage(TSM)
Quick shortcut for the plugin-service or the application host to process a TSM localy. The Topic parameter of the TheProcessMessage will be automatically set to the ENG parameter of the TSM If the application is scoped, the message will be automatically scoped with the internal ScopeID
Public method ProcessMessage(TheProcessMessage)
Quick shortcut for the plugin-service or the application host to process a TSM localy. If the application is scoped, the message will be automatically scoped with the internal ScopeID Additionally a local callback can be specified in TheProcessMessage that will be called when processing is done The returning TSM in the callback is not necessarily the same as the incoming TSM. This can be overwritten by the plugin-service during processing.
Public method PublishToChannels
This function allows to send a TSM only to the attached nodes of a plugin-service In general we recommend using the TheCoreComm.PublishCentral() or TheCoreCommPublishToFirstNode() calls
Public method RegisterCSS
New 3.2: Allows to register a CSS File for a plugin. The function can be called multiple times to register more than one CSS File
Public method RegisterEvent
New in V3.0: Registers an Event with this Engines Base Thing (short for this.GetBaseThing().RegisterEvent() but verifies that the BaseThing is valid and active)
Public method RegisterJSEngine
Used to register a JavaScript Engine for this Base Engine. The callback requires to deliver back the javascript engine. The engine can decide how to deliver back the engine. The C-DEngine will help with "MyBaseEngine.GetPluginResource(pRequest)". This function can be called in the callback if the JavaScript engine is located in the ClientBin Folder and named exactly like the name given with "SetEngineName()"
Public method ReplyInitialized
LiveEngines/Data providing services can reply "CDE_INITIALIZED" to a node that requested "CDE_INITIALIZE" using this convenience method. The TSM is necessary to identify the originator of the CDE_INITIALIZE message.
Public method ResetChannel
New in V2.5: Resets the current Engine Channel. This might become necessary when the scopeID has changed
Public method ResurectChannels
Forces the engine to resurrect any dead channel
Public method SetCDEMinVersion
Sets the minimum version of the C-DEngine required by the plug-in
Public method SetDashboard
Sets the guid of the main NMI Dashboard. Although a GUID syntax is required, the parameter will be run through the "GenerateFinalStr()" method in TheCommonUtils class. This allows for marcro definition in the string that will be resolved at runtime.
Public method SetDeviceTypes
Indicates which device types this Plugin-Service supports
Public method SetEngineID
Unique Guid for the Engine. This can be used for versioning management and plugin-identification in case two plugins with the same ClassName exist in one solution.
Public method SetEngineName
Sets the Engine Name (ClassName) for the Plugin-Service This call is MANDATORY and should be called in the "SetBaseEngine()" function of the plugin
Public method SetEngineReadiness
Call this function to tell the C-DEngine that the plugin-service is ready to take connection (if its a service and live) or that it has received a working connection.
Public method SetEngineService
Tells the C-DEngine if this Plugin-Service is a Service/Data-Provider or a Data-Consumer
Public method SetEngineType
Sets the Type of the Plugin-Service This is required if resources need to be loaded by the C-DEngine that are located in the Plugin
Public method SetFriendlyName
Optionally this call can be used to give a friendly name to the Engine. This name is used by the ISM service if its set, otherwise the ClassName is used.
Public method SetInitialized
If you handle the CDE_INITIALIZE message, tell the C-DEngine when you are done with the process. ReplyInitialized is calling this method internally. This also sets the Engine Readiness to "true"
Public method SetIsInitializing
Tells the C-DEngine that this Plugin-Service has been initialized. In most cases of loosly coupled service, this is not really necessary, but some data consumer require a tighter connection to their data-provider and want to make sure the connection is properly established and initialized. The StorageService is such as more tighter connected service.
Public method SetIsLicensed
Plug-in call this from their InitEngineAssets() method to indicate that they require an activated license
Public method SetIsMiniRelay

Setting this flag to true tells the C-DEngine that this plugin does not contain any code and only relays properly scoped telegrams between nodes. This is very useful in scenarios where you have multiple relays on-premise that need to just relay telegrams but do not add any value/services to the telegrams. The C-DEngine supports a configuration setting in the APP.CONFIG that tells the C-DEngine just to relay telegrams with a certain topic:

<add key="RelayOnly" value="Topics Separated with;" />

For Example:

<add key="RelayOnly" value="CDMyInformation.TheInfoService" />

This setting would tell the C-DEngine to relay all telegrams tagged with "CDMyInformation.TheInfoService" to all other connected node.

Public method SetIsolationFlags
Sets the isolation permission for a plugin Service. ALL services in one Plugin DLL have to use the same setting
Public method SetMultiChannel
If a Plugin-Service sets this to true, it can establish one-to-many connection. This allows for mutliple data-provider to talk to one data consumer and one data-provider can have multiple data consumers connected at the same time. If set to false, the connection will always be a one-to-one connection and additional provider or consumer will be put in a redundancy list. If the current connection fails, the service will automatically connect to the next service in the redundancy list. Be aware: MultiChannels in a Mesh Based environment with many nodes can cause a lot of traffic between the nodes
Public method SetNewVersion
Callled when a new version of this plugin is available
Public method SetPluginInfo
Defines all Plug-in Information for the plugin Store
Public method SetStatusLevel
Sets the StatusLevel property on the Engine and colors the status light in the "Status" Box. 0 = Idle (not active/Gray) 1 = All ok (Green) 2 = Warning (Yellow) 3 = Error (Red) 4 = Rampup (Blue) 5 = Design / Engineering / Configuration (Brown) 6 = Shutdown (Violett) 7 = Unknown/Unreachable (black)
Public method SetVersion
Sets a string representation of the Version of the Plugin-Service This version is represented in the ISM
Public method StartEngine
Starts the plugin-service with a new ChannelDefinition. If the engine was already started, the new channel will be added to the redundancy list. If the engine is a multi-channel the channel will be immediately activated
Public method StopEngine
This function will stop a plugin-service and stop all communication channels currently active
Public method Subscribe
Sends CDE-SUBSCRIBE to a given channel. A subscription to a topic tells the connected node to relay information regarding this topic to the subscriber. This subscribe function will send the ClassName of the plugin-service to the designated channel and expects publications to it. If the Application has an active scope the subscription will be scoped as well. Preventing unwanted and unauthorized telegrams to be sent to this plugin-service
Public method ToString (Inherited from Object.)
Public method UnregisterEvent
New in V3.0: Unregisters an Event with this Engines Base Thing (short for this.GetBaseThing().UnregisterEvent() but verifies that the BaseThing is valid and active)
Public method UpdateCosting
This function will be called by the C-DEngine before a telegram is sent to the next nodes.
Public method UpdateEngineState
Updates an interal object containing the complete state of the plugin-service. This is used by the ISM service for service health monitoring The state contains a list of all valid subscriptions to this service. Since subscriptions can be scoped a valid scope ID has to be provided.