Difference between revisions of "Implementation notes"
From AMTech WikiDocs
Line 2: | Line 2: | ||
**It leverages AMTech IoT Protocol (See [[IoT Restful API|IoT Restful API]]) | **It leverages AMTech IoT Protocol (See [[IoT Restful API|IoT Restful API]]) | ||
***Clone configuration from exiting M2MBridge template configuration (See [[M2M Bridge#Edge Configuration|Edge Configuration]]) | ***Clone configuration from exiting M2MBridge template configuration (See [[M2M Bridge#Edge Configuration|Edge Configuration]]) | ||
− | ***Gets observation production configuration (See [[IoT | + | ***Gets observation production configuration (See [[IoT Restful API#Get observation production configuration|Observation production configuration API]]) |
***Gets thing types instances (See [[Integration Guideline#Get instances by thing type|Observation instances API]]) | ***Gets thing types instances (See [[Integration Guideline#Get instances by thing type|Observation instances API]]) | ||
***Creates a web socket to receive asynchronous commands and thing instances changes (crud operations) (See [[Integration Guideline#Commands|CRUD and Commands API]]) | ***Creates a web socket to receive asynchronous commands and thing instances changes (crud operations) (See [[Integration Guideline#Commands|CRUD and Commands API]]) |
Revision as of 17:19, 25 April 2016
- M2MBridge discovers and loads node.js modules implementing "M2MBridge plugin interface"(See Thing types) tacking into account thing instances, activity(s) observation production configuration (See Observation production configuration) and M2MBridge credentials (See Actors and Edge Configuration).
- It leverages AMTech IoT Protocol (See IoT Restful API)
- Clone configuration from exiting M2MBridge template configuration (See Edge Configuration)
- Gets observation production configuration (See Observation production configuration API)
- Gets thing types instances (See Observation instances API)
- Creates a web socket to receive asynchronous commands and thing instances changes (crud operations) (See CRUD and Commands API)
- Dispatch command observations to plugin instance leveraging thing type instance @id (See Thing types)
- Restart instance when supported properties change by calling stop and star plugin interface
- Creates configuration information by Thing type leveraging configuration information and client side M2MBridge placeholders (See Observation production configuration and Placeholders)
- Load plugin nodes modules required by configuration
- Creates an instance of plugin for each thing type instance using instance @id as identifier (See Thing types)
- JavaScript object is extended with the properties values from the thing instance (See plugin example )
- Properties and methods are injected: (See for details)
- common logger
- methods to send observations with and without enrichment
- methods for restarting plugin
- Creates a centralized observation dispatcher with persistence to ensure:
- Observations delivery in the order that observations occurred.
- Placeholders (See Placeholders)
- #{deviceId} m2mBox Id set at bridgeConfig.json configuration file bridgeId property, or a unique id create in absence or this value
- #{typeId} Unique id of the thingType that produces the event
- #{thingId} Unique id of the instances that produces the event
- #{tenantId} Tenant id used to authenticate the m2mBridge, defined at bridgeConfig.json tenant property
- #{userId} User id used to authenticate the m2mBridge, defined at bridgeConfig.json userId property
- It leverages AMTech IoT Protocol (See IoT Restful API)