Minchen OPC server core application 1.0 download: Download, details:
/* Drop table [deviceevent] */
Drop table if exists [deviceevent];
/* Device events, mainly for sending messages to devices, which will be deleted after being sent */
Create Table [deviceevent] (
[DeviceID] bigint not null,
[Devicevalue] varchar (255) not null,
Constraint [sqlite_autoindex_deviceevent_1] primary key ([DeviceID]);
/* Data [deviceevent] */
/* Drop table [deviceinfo] */
Drop table if exists [deviceinfo];
Create Table [deviceinfo] (
[Autoid] bigint not null,
[Devicename] char (100) not null,
[Opcname] char (255) not null,
[Areaid] bigint not null,
[Subsystemid] bigint not null,
[Devicetype] bigint not null,/* data type, such as vt_int, vt_bstr */
[Devicedesc] varchar (255 ),
Constraint [sqlite_autoindex_deviceinfo_1] primary key ([autoid]);
/* Data [deviceinfo] */
/* Drop table [devicestatus] */
Drop table if exists [devicestatus];
/* device status */
Create Table [devicestatus] (
[DeviceID] bigint not null,
[devicevalue] varchar (255) not null,
[isalarm] int not null default (0),/* sets whether to set alarm, 1, alarm; others are not reported */
constraint [sqlite_autoindex_devicestatus_1] primary key ([DeviceID]);
the above database is the SQLite export structure, where, in the devicestatus table, the client pushes the server and stores it in the devicestatus table.
the deviceinfo table is the main table for storing the point. autoid and OPC are mainly used in core applications. Name, devicetype,
where devicetype represents the com data type, the integer is 3, the float is 4, and the BSTR is 8. when the core application starts, it automatically obtains the opcname from the table and creates the
the deviceevent table is used for the server to push data to the client, for example, if an event is added by modifying the database or other Program , the core library releases the data to the client and then clears the event.