Changes to entity according to AGRO2018
This commit is contained in:
12
ADIS_LKV.py
12
ADIS_LKV.py
@@ -46,16 +46,16 @@ entities ['880022'] = [
|
||||
(14, 'OPT', '00900070', 'Stallnummer', 'N', 15, 0, '', 0),
|
||||
(15, 'OPT', '00804841', 'Bemerkungen', 'AN', 30, 0, '', 0),
|
||||
(16, 'OPT', '00800134', 'RFID', 'AN', 20, 0, '', 0),
|
||||
(17, 'OPT', '00821005', 'Milchflussdauer', 'N', 5, 3, '', 0),
|
||||
(18, 'OPT', '00900097', 'Herdenspez. Elektron. ID', 'AN', 16, 0, '', 0),
|
||||
(19, 'OPT', '00800122', 'Melkplatz', 'AN', 3, 0, '', 0)
|
||||
(17, 'OPT', '00900097', 'Herdenspez. Elektron. ID', 'AN', 16, 0, '', 0),
|
||||
(18, 'OPT', '00800122', 'Melkplatz', 'AN', 3, 0, '', 0),
|
||||
(19, 'OPT', '00800123', 'Milchflussdauer AMS', 'N', 4, 0, '', 0)
|
||||
]
|
||||
|
||||
class ADIS:
|
||||
def __init__ (self, loglevel):
|
||||
self.loglevel = loglevel
|
||||
#Optional Fields for an entity
|
||||
self.entityfields = {'880022': ['00900042', '00821005'],
|
||||
self.entityfields = {'880022': ['00900042', '00800123'],
|
||||
'990001': [ '00900007', '00900009']}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ class ADIS:
|
||||
data ['00900006'] = 'Siliconform'
|
||||
data ['00900007'] = 'LKV'
|
||||
data ['00900008'] = '1.00'
|
||||
data ['00900009'] = 'AGRO2014'
|
||||
data ['00900009'] = 'AGRO2018'
|
||||
ds = "VH990001"
|
||||
for nr, art, item, name, datatype, length, resolution, unit, code in fields:
|
||||
if art in ['KEY', 'MAN'] or item in self.entityfields ['990001']:
|
||||
@@ -142,7 +142,7 @@ class ADIS:
|
||||
data ['00900054'] = mdate.replace ("-", "")
|
||||
data ['00900078'] = starttime.replace (":", "")
|
||||
data ['00900042'] = float (ammount) / 1000.0 #0.1kg
|
||||
data ['00821005'] = int (time)
|
||||
data ['00800123'] = int (time)
|
||||
#data ['00201860'] = milkplace
|
||||
|
||||
ds = "VN880022"
|
||||
|
||||
Reference in New Issue
Block a user