+-------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------------------+------+-----+---------+-------+ | id | int(5) | | PRI | 0 | | | cset | float(5,1) | YES | | NULL | | | dac | float(5,1) | YES | | NULL | | | cmon | float(5,1) | YES | | NULL | | | vmon | float(5,1) | YES | | NULL | | | stat | tinyint(3) unsigned | YES | | NULL | | | time | timestamp(14) | YES | | NULL | | +-------+---------------------+------+-----+---------+-------+
+-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+-------+ | id | int(5) | | PRI | 0 | | | name | char(4) | YES | | NULL | | +-------+---------+------+-----+---------+-------+
+----+------+ | id | name | +----+------+ | 0 | Q1 | | 1 | Q2 | | 2 | D1 | | 3 | D3 | | 4 | Q3 | | 5 | Q4 | | 6 | D4 | +----+------+
record(magnet,"$(name):$(port):$(table):$(MAG)") { field(DESC, "MySQL select") field(SCAN,"1 second") field(DTYP,"SoftChannel") field(INP,"$(name):$(port):$(table)-$(MAG)") } |
#!../../bin/linux-x86/example < envPaths cd ${TOP} ## Register all support components dbLoadDatabase("dbd/example.dbd") example_registerRecordDeviceDriver(pdbbase) sqlDriverInit("hostname", "username", "password","DB-name", auto-connect) dbLoadRecords("db/testBufs.db","name=nakapc1,port=bcce0,addr=1,table=pi2") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=Q1") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=Q2") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=D1") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=D3") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=Q3") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=Q4") dbLoadRecords("db/testSofts.db","name=nakapc1,port=bcce0,table=pi2,MAG=D4") iocInit() |