Difference between revisions of "IoTGateway/DataProcess"

From ESS-WIKI
Jump to: navigation, search
Line 62: Line 62:
 
|-
 
|-
 
|}
 
|}
 
 
  
  
Line 128: Line 126:
 
|-
 
|-
 
|}
 
|}
 
 
  
  
Line 179: Line 175:
 
|-
 
|-
 
|}
 
|}
 +
 +
  
 
=SQL Structure and Define for Handler=
 
=SQL Structure and Define for Handler=

Revision as of 23:47, 5 September 2016

This Data Format and SQL Field design for Data e-motion, MRDC, and .

SQL Field

SQLite Table Fields ( Auto Index)
Item Field Name Type Need Format Example
1 Key Unsigned Int Must   6886 (serial number)
2 SecondKey Text Optional   Default: Hanle Name: SUSHandler
3 Protocol_Param Text Optional JSON {"Type":"MQTT","TypeId":1, "QoS":0 }
4 Message Text Optional   {IoTGW { …. } )
5 Send Flag Optional 0 or 1 1 or 0
6 Time Unsigned Int Must   33325 ( UTC in sec )
7 General Text Optional   any type format


SQLite Table Fields ( User Assign Key )
Item Field Name Type Need Format Example
1 Key Text Must   /cagent/admin/infoack
2 SecondKey Text Optional   Default: Hanle Name: SUSHandler
3 Protocol_Param Text Optional JSON {"Type":"MQTT","TypeId":1, "QoS":0 }
4 Message Text Optional   {IoTGW { …. } )
5 Send Flag Optional 0 or 1 1 or 0
6 Time Unsigned Int Must   33325 ( UTC in sec )
7 General Text Optional   any type format


SQLite Methods
Item Method Note
1 Insert *by Primary key

*by Second key ( ex: HandlerName ) ( primary key => auto index )

2 Update by Primary key
3 Query * by Primary key

* by Search rules ( like or updatetime or latest item / order by ? (time ...) )

* All ( order by time )

4 Clean *by Primary Key

*by Search rules ( like or updatetime or latest item / order by ? (time ...) )

*All items of Table

5 Create Table *AutoIndex

*UniqueKey


SQL Structure and Define for Handler