Unicon documentation migration is in progress. You might find some broken links or experience minor issues in the documentation. We are working on resolving these issues.

X

Scout Database Model (CR)

Table: UpdateDevice

Each entry holds the data of a single device which is (or was) part of an update job. Entries may only be removed if the corresponding update job is not running.

ColumnName Data Type Key Not Null Default Value Comment
UpdateDeviceID INTEGER PK NN   Unique ID of update device
UpdateJobID INTEGER FK     The Id of update job this client is part of  Foreign key refers to UpdateJob table
Id INTEGER (FK) NN   Client IDRefers to DeviceID of Device table
Mac NVARCHAR(255)   NN   Client MAC address
ClientIdentifier UNIQUEIDENTIFIER   NN   Unique identifier for client devices and eLux portable sticks
Ip NVARCHAR(255)   NN   Client IP address
TimeCreated INTEGER   NN   Creation time (Unix time)
TimeModified INTEGER  
NN
 
Last modification time (Unix time)
SetupID INTEGER Device configuration where the firmware parameters come from (refers to table Setup)
UpdOption



INTEGER



 



 



0



Update option
1 - UPD_DEVOPTION_V2
2 - UPD_DEVOPTION_V6
4 - UPD_DEVOPTION_CANFORMAT
7 - Combination of the flags above
StartStatus

INTEGER

 

 

 

State of device at beginning of update job
1 - UPD_DEVSTATUS_OFF, Client was switched off
3 - UPD_DEVSTATUS_ON, Client was up and running
Status





INTEGER





 





 





 





Current state of device
1 - UPD_DEVSTATUS_OFF, Client is switched off
2 - UPD_DEVSTATUS_STARTING, Client is starting
3 - UPD_DEVSTATUS_ON, Client is up and running
4 - UPD_DEVSTATUS_UPDATING, Client is updating
5 - UPD_DEVSTATUS_DONE, Client has been updated
6 - UPD_DEVSTATUS_WAITHALT, Client is shutting down
Result

INTEGER

 


 


 


Update result
0 - UPD_JOBRESULT_OK, Update successful
1 - UPD_JOBRESULT_ERROR, Update failed
GroupID INTEGER Group which owns the device specific update parameters (foreign key refers to table Groups
Version NVARCHAR(255)       Version of client
ProgressStatus INTEGER       Status of update process:Start transfer, End transfer, Deferred, Start installation, End installation
ClientFeatures INTEGER       Features the client is capable of (can be a bit combination of values) For the values, see the Device table.
ReservedString1 NVARCHAR(255)        
ReservedString2 NVARCHAR(255)        
ReservedInt1 INTEGER        
ReservedInt2 INTEGER        
IndexName IndexType Columns
PRIMARY PRIMARY UpdateDeviceID

How to create

CREATE TABLE UpdateDevice( UpdateDeviceID INTEGER NOT NULL, UpdateJobID INTEGER, Id INTEGER NOT NULL, Mac NVARCHAR(255) NOT NULL, ClientIdentifier UNIQUEIDENTIFIER NOT NULL, Ip NVARCHAR(255) NOT NULL, TimeCreated INTEGER NOT NULL, TimeModified INTEGER NOT NULL, SetupID INTEGER, UpdOption INTEGER, StartStatus INTEGER, Status INTEGER, Result INTEGER, GroupID INTEGER, Version NVARCHAR(255), ProgressStatus INTEGER, ClientFeatures INTEGER; ReservedString1 NVARCHAR(255), ReservedString2 NVARCHAR(255), ReservedInt1 INTEGER, ReservedInt2 INTEGER, CONSTRAINT FK_UpdateDevice_UpdateJobID_UpdateJob_UpdateJobID FOREIGN KEY (UpdateJobID) REFERENCES UpdateJob (UpdateJobID), CONSTRAINT PK_UpdateDevice PRIMARY KEY (UpdateDeviceID));
Table: UpdateDevice