Skip to content
Erkan edited this page Jan 6, 2014 · 17 revisions

Protocole documentation

Commands

get(1, info)

<REPLY get(1, info)>
1 ECoS
1 ProtocolVersion[0.1]
1 ApplicationVersion[1.1.3]
1 HardwareVersion[1.4]
<END 0 (OK)>
get(1, status)

<REPLY get(1, status)>
1 status[GO]
<END 0 (OK)>
queryObjects(10, name, addr)

<REPLY queryObjects(10, name, addr)>
1000 name["TSO BR215"] addr[3]
1001 name["BR80 033"] addr[4]
<END 0 (OK)>
get(1000,name,speed,dir,locodesc)

<REPLY get(1000,name,speed,dir,locodesc)>
1000 name["circuit1"]
1000 speed[0]
1000 dir[1]
1000 symbol[LOCO_TYPE_DIESEL, IMAGE_TYPE_INT, 8]
<END 0 (OK)>
get(1000,func[0],func[1],func[2],func[3],func[4],func[5],func[6],func[7])

<REPLY get(1000,func[0],func[1],func[2],func[3],func[4],func[5],func[6],func[7])>
1000 func[0, 0]
1000 func[1, 0]
1000 func[2, 0]
1000 func[3, 0]
1000 func[4, 0]
1000 func[5, 0]
1000 func[6, 0]
1000 func[7, 0]
<END 0 (OK)>
<REPLY get(1000, funcexists[0], funcexists[1], funcexists[2], funcexists[3], funcexists[4], funcexists[5], funcexists[6], funcexists[7], funcexists[8])>
1000 funcexists[0, 3]
1000 funcexists[1, 260]
1000 funcexists[2, 8]
1000 funcexists[3, 37, moment]
1000 funcexists[4, 32]
1000 funcexists[5, 263]
1000 funcexists[6, 7, moment]
1000 funcexists[7, 11]
1000 funcexists[8, -1]
<END 0 (OK)>

Objects

queryObjects(11, name1, name2, addrext)

<REPLY queryObjects(11, name1, name2, addrext)>
20001 name1["02"] name2[""] addrext[1g, 1r]
20002 name1["03"] name2[""] addrext[1g, 1r]
20003 name1["04"] name2[""] addrext[1g, 1r]
20004 name1["05"] name2[""] addrext[1g, 1r]
20005 name1["06"] name2[""] addrext[1g, 1r]
20006 name1["44"] name2["Entkuppler"] addrext[1g, 1r]
<END 0 (OK)>
get(20023, state, addrext, protocol, name1, name2, name3)

<REPLY get(20023, state, addrext, protocol, name1, name2, name3)>
20023 state[0]
20023 addrext[43g, 43r]
20023 protocol[MM]
20023 name1["43"]
20023 name2["Lampen"]
20023 name3["Bahnhofsbereich"]
<END 0 (OK)>

Control and View

request(1000, control, force)

<REPLY request(1000, control, force)>
<END 0 (OK)>
release(1001, control)

<REPLY release(1001, control)>
<END 0 (OK)>
request(1000, view)

<REPLY request(1000, view)>
<END 0 (OK)>

Events

From station

<EVENT 1>
1 status[STOP]
<END 0 (OK)>
<EVENT 1>
1 status[GO]
<END 0 (OK)>

From train

<EVENT 1000>
1000 func[0, 1]
<END 0 (OK)>
<EVENT 1000>
1000 speed[64]
1000 speedstep[14]
<END 0 (OK)>
<EVENT 1000>
1000 dir[1]
<END 0 (OK)>
<EVENT 1001>
1001 msg[CONTROL_LOST]
<END 0 (OK)>

From objects

<EVENT 20028>
20028 state[0]
<END 0 (OK)>