# Created with ICC 2.5.0 Build: 15297

# --------------------------------------------------------
# 
# wwt Unit
# 
# --------------------------------------------------------

wwt.unitIds=truck
wwt.unitId.truck=999


# --------------------------------------------------------
# 
# Unit and Infoman masterdatas
# 
# --------------------------------------------------------

wwt.unitName=TEST001
wwt.customerUnitName=TT01
wwt.unitData.unitUser=proveo
wwt.unitData.unitKind=ALL
wwt.unitData.unitType=TT
wwt.unitData.unitManufator=AXEL
wwt.unitData.unitDescription=Truck
wwt.unitData.infomanDescription=Phytec
wwt.unitData.infomanSN=PVW7435221100


# --------------------------------------------------------
# 
# wwt Server
# 
# --------------------------------------------------------

# compressed events
wwt.url.compressed=http://88.198.184.50:8080/datain/c   
wwt.url.compressed=http://88.198.184.50:8080/datain/c

# uncompressed events
wwt.url.uncompressed=http://88.198.184.50:8080/datain/e


# --------------------------------------------------------
# 
# Network
# 
# --------------------------------------------------------

# none, eth, gprs or wlan
network.dev=none
network.gsm.pin=9751


# --------------------------------------------------------
# 
# Digital Inputs
# 
# "io.in0=[!]inputAlias [debounce in ms] [trigger edge: 'both', 'falling', 'rising' and 'disabled']"
# "[!] = negated"
# 
# --------------------------------------------------------

# connector1 pin1
io.in0=in0 1000

# connector1 pin2
io.in1=in1 1000

# connector1 pin3
io.in2=in2 1000

# connector1 pin4
io.in3=in3 1000

# connector1 pin6
io.in4=in4 1000

# connector1 pin7
io.in5=in5 1000

# connector1 pin9/10
io.in6=in6 1000

# connector1 pin11/12
io.in7=in7 1000

# connector2 pin1
io.in8=in8 1000

# connector2 pin2
io.in9=in9 1000

# connector2 pin3
io.in10=in10 1000

# connector2 pin4
io.in11=in11 1000

# connector2 pin6
io.in12=in12 1000

# connector2 pin7
io.in13=in13 1000

# connector2 pin9/10
io.in14=in14 1000

# connector2 pin11/12
io.in15=in15 1000


# --------------------------------------------------------
# 
# Digital Inputs - descriptions
# 
# --------------------------------------------------------

# connector1 pin1
io.in0.description=Input0

# connector1 pin2
io.in1.description=Input1

# connector1 pin3
io.in2.description=Input2

# connector1 pin4
io.in3.description=Input3

# connector1 pin6
io.in4.description=Input4

# connector1 pin7
io.in5.description=Input5

# connector1 pin9/10
io.in6.description=Input6

# connector1 pin11/12
io.in7.description=Input7

# connector2 pin1
io.in8.description=Input8

# connector2 pin2
io.in9.description=Input9

# connector2 pin3
io.in10.description=Input10

# connector2 pin4
io.in11.description=Input11

# connector2 pin6
io.in12.description=Input12

# connector2 pin7
io.in13.description=Input13

# connector2 pin9/10
io.in14.description=Input14

# connector2 pin11/12
io.in15.description=Input15


# --------------------------------------------------------
# 
# Digital Outputs
# "io.out1=[!]outputAlias"
# "[!] = negated"
# 
# --------------------------------------------------------

# connector 3 pin 1
io.out0=userAuthenticated

# connector 3 pin 2
io.out1=crashTriggerDelayed

# connector 3 pin 3
io.out2=counterBothDetectedDelayed

# connector 3 pin 4
io.out3=ledAccessGrant


# --------------------------------------------------------
# 
# Digital Outputs - descriptions
# 
# --------------------------------------------------------

# connector 3 pin 1
io.out0.description=iButton Detected

# connector 3 pin 2
io.out1.description=USB Device

# connector 3 pin 3
io.out2.description=Counter Detected

# connector 3 pin 4
io.out3.description=iButton Detected


# --------------------------------------------------------
# 
# Temperature
# "[blackboard alias] [polling interval in ms] [delta up between fire] [delta down between fire] [meanAverage base count] [meanAverageInterval]"
# 
# --------------------------------------------------------



# --------------------------------------------------------
# 
# Analog Inputs
# "[blackboard alias] [polling interval in ms] [delta between fire up] [delta between fire down]"
# 
# --------------------------------------------------------

# connector 4 pin 10
io.ina0=analog0 1000 3 3

# connector 4 pin 11
io.ina1=analog1 1000 3 3


# --------------------------------------------------------
# 
# Analog Inputs - descriptions
# 
# --------------------------------------------------------

# connector 4 pin 10
io.ina0.description=Analog0

# connector 4 pin 11
io.ina1.description=Analog1


# --------------------------------------------------------
# 
# Counter Inputs
# "[blackboard item] [type: counter (default), frequency] [notify delta: 0 (default)]"
# 
# --------------------------------------------------------

# connector 4 pin 5/6
io.counter0=count0 frequency 5
io.counter0.frequencyPrecisionDivisor=1
io.counter0.description=Counter 0

# connector 4 pin 7/8
io.counter1=count1 frequency 5
io.counter1.frequencyPrecisionDivisor=1
io.counter1.description=Counter1


# --------------------------------------------------------
# 
# Powermanagement
# 
# --------------------------------------------------------

powermanagement.standby=vehicleNotUsed
powermanagement.standby.5V=true
powermanagement.standby.wakeupSignals.0=in8 enabled
powermanagement.standby.unitId=wwt.unitId.truck
powermanagement.standby.stateModel=2110
powermanagement.standby.sleepingStateId=2111



# --------------------------------------------------------
# 
# Authenticator & Authoritator
# 
# --------------------------------------------------------

auth=true
auth.src.login=ibuttonArrival
auth.src.logout.0=!inputAll
auth.unitId=wwt.unitId.truck
auth.src.login.flag=inputAll
auth.src.runningBeforeInit=inputAll
auth.out.authenticated=userAuthenticated


# --------------------------------------------------------
# 
# OneWire - iButton
# 
# --------------------------------------------------------

io.ibutton=true
io.ibutton.device=sio2
io.ibutton.arrivalEvt=ibuttonArrival
io.ibutton.departureEvt=ibuttonDeparture
io.ibutton.errorEvt=ibuttonError


# --------------------------------------------------------
# 
# Mifare Adapter
# 
# --------------------------------------------------------

mifare=true
mifare.device=plugin
io.mifare.tagInFieldEvt=ibuttonArrival


# --------------------------------------------------------
# 
# Analog Schmitt Trigger
# "[blackboard alias with analog value] [blackboard alias with trigger output] [raise trigger analog value] [fall trigger analog value] [evaluation enabled (optional) since 0.8.10]"
# 
# --------------------------------------------------------

blackboard.schmittTriger.0=analog0 Analog0Good 501 3000 inputConn1
blackboard.schmittTriger.1=count0 count0Good 5 5 inputConn1
blackboard.schmittTriger.2=count1 count1Good 5 5 inputConn1
blackboard.schmittTriger.3=analog1 Analog1Good 501 3000 inputConn2


# --------------------------------------------------------
# 
# CrashSensor
# 
# --------------------------------------------------------

crashsensor=true
crashsensor.device=sio5
crashsensor.device.baudrate=115200
crashsensor.device.databits=8
crashsensor.device.stopbits=1
crashsensor.device.parity=none
crashsensor.device.flow=none
crashsensor.threshold.x.plus=50
crashsensor.threshold.x.minus=50
crashsensor.threshold.y.plus=50
crashsensor.threshold.y.minus=50
crashsensor.crashEvent.blackboardItem=crashSensorEvent
crashsensor.crashTrigger.blackboardItem=crashTrigger
crashsensor.crashTrigger.time=1000


# --------------------------------------------------------
# 
# notify Config
# "[wohin soll die condition geschrieben werden und auf was soll reagiert werden?] [unitId alias] [notify id] [condition]"
# 
# --------------------------------------------------------



# --------------------------------------------------------
# 
# Helper items on blackboard
# "[was soll geschrieben werden?] [auf was soll reagiert werden?]"
# 
# --------------------------------------------------------

blackboard.links.0=inputAll inputConn1 AND inputConn2
blackboard.links.1=inputConn1 in0 AND in1 AND in2 AND in3 AND in4 AND in5 AND in6 AND in7
blackboard.links.2=counterBothDetected count0Good AND count1Good
blackboard.links.3=inputConn2 in8 AND in9 AND in10 AND in11 AND in12 AND in13 AND in14 AND in15
blackboard.links.4=inputIncomplete inputAll NOT
blackboard.links.5=sleepTrigger in8 NOT


# --------------------------------------------------------
# 
# Blackboard Debug Events
# 
# "[unitId Alias] [blackboard item] [edge] [description]"
# edge = raise, fall or both
# 
# --------------------------------------------------------

blackboard.debug.event.0=wwt.unitId.truck inputConn1 both Connector1
blackboard.debug.event.1=wwt.unitId.truck crashTriggerDelayed raise USB Device
blackboard.debug.event.2=wwt.unitId.truck userAuthenticated raise iButton
blackboard.debug.event.3=wwt.unitId.truck inputConn2 both Connector2
blackboard.debug.event.4=wwt.unitId.truck Analog0Good both Anlalog0
blackboard.debug.event.5=wwt.unitId.truck Analog1Good both Anlalog1
blackboard.debug.event.6=wwt.unitId.truck counterBothDetected both Both Counter Detected
blackboard.debug.event.7=wwt.unitId.truck vehicleNotUsed both SLEEP MODE


# --------------------------------------------------------
# 
# Delayer Config
# "[auf was soll reagiert werden?] [was soll geschrieben werden?] [t up] [t down] [reset]"
# 
# --------------------------------------------------------

blackboard.delay.0=crashTrigger crashTriggerDelayed 0 300000 inputIncomplete
blackboard.delay.1=counterBothDetected counterBothDetectedDelayed 0 300000 inputIncomplete
blackboard.delay.2=sleepTrigger vehicleNotUsed 5000 0


# --------------------------------------------------------
# 
# StateModels
# 
# --------------------------------------------------------

statemodels=Analog0 Analog1

statemodel.Analog0.unitId=wwt.unitId.truck
statemodel.Analog0.stateModelId=2030
statemodel.Analog0.states=empty0 half0 full0
statemodel.Analog0.state.empty0=2030
statemodel.Analog0.state.half0=2034
statemodel.Analog0.state.full0=2039

statemodel.Analog1.unitId=wwt.unitId.truck
statemodel.Analog1.stateModelId=2030
statemodel.Analog1.states=empty1 half1 full1
statemodel.Analog1.state.empty1=2030
statemodel.Analog1.state.half1=2034
statemodel.Analog1.state.full1=2039


# --------------------------------------------------------
# 
# StateModels - changes
# 
# --------------------------------------------------------

statemodel.Analog0.changes.analog=analog0
statemodel.Analog0.changes.evaluateEnabled=inputConn1
statemodel.Analog0.changes.rawDataRemark=true
statemodel.Analog0.changes.analog.0=empty0 0 500
statemodel.Analog0.changes.analog.1=half0 501 3000
statemodel.Analog0.changes.analog.2=full0 3001 4095

statemodel.Analog1.changes.analog=analog1
statemodel.Analog1.changes.evaluateEnabled=inputConn2
statemodel.Analog1.changes.rawDataRemark=true
statemodel.Analog1.changes.analog.0=empty1 0 500
statemodel.Analog1.changes.analog.1=half1 501 3000
statemodel.Analog1.changes.analog.2=full1 3001 4095


# --------------------------------------------------------
# 
# Geo
# 
# --------------------------------------------------------



# --------------------------------------------------------
# 
# Others
# 
# --------------------------------------------------------

can=true
can.baud=250
can.blocking=false
can.readEnabled.timeout=-1
can.sleeptime=250
infoman.geo.stopRuleDelay=10000
infoman.geo.stopRuleSpeedTriggerIndex=0
infoman.update.acceptUpdate=true
infoman.update.removeOldVersions=true

# connector 4 pin 5/6
io.counter.0=count0 frequency 5
io.counter.0.description=Counter 0
io.counter.0.frequencyPrecisionDivisor=1

# connector 4 pin 7/8
io.counter.1=count1 frequency 6
io.counter.1.description=Counter 1
io.counter.1.frequencyPrecisionDivisor=1
mifare.can.baseId=0x100
mifare.convert.ascii=false
mifare.convert.case=upper
mifare.convert.endIndex=8
mifare.convert.offset=0
mifare.expectedLength=8
mifare.led.green=ledAccessGrant
mifare.led.red=ledAccessDenied
mifare.type=can
network.wifi.0.auth_alg=OPEN
network.wifi.0.group=WEP104
network.wifi.0.key_mgmt=NONE
network.wifi.0.scan_ssid=1
network.wifi.0.ssid="wlan_proveo"
network.wifi.0.wep_key.0="543GqVvGMSqg3"
network.wifi.addr=static
network.wifi.addr.dns=10.38.1.34
network.wifi.addr.gw=10.38.1.1
network.wifi.addr.ip=10.38.1.157
network.wifi.addr.netmask=255.255.255.0


