Client to Server
{
'type': "login"
'scoutName': String
}
Server to Client
{
'CID': int
}
Client to Server
{
'type': "prepare"
'CID': int
}
Server to Client
{
'matchNumber': int,
'teamNumber': int
}
Supervisor to Server '''javascript { 'type': "getNextMatch" 'CID': int } ''' Server to Supervisor '''javascript { // if error 'type': 'status' 'status': 'noNextMatch' 'description': 'error text' } { //else 'type': 'nextMatchData' 'matchNumber': int 'redTeam1': int 'redTeam2': int 'redTeam3': int 'blueTeam1': int 'blueTeam2': int 'blueTeam3': int } '''
Supervisor to Server '''javascript { 'type': 'setMatchData' 'matchNumber': int 'redTeam1': int 'redTeam2': int 'redTeam3': int 'blueTeam1': int 'blueTeam2': int 'blueTeam3': int } ''' Server to Supervisor '''javascript { // if fine 'type': 'status' 'status': 'ok' } { // else 'type': 'status' 'status': 'badMessage' } '''
Client to Server
{
'type': "ready"
'CID': int,
'matchNumber': int
}
Server to Client
{
'started': true
}
Supervisor to Server '''javascript { 'type': 'getClients' } ''' Server to Supervisor '''javascript { 'type': 'connectedClients' 'clients': [{'CID': int, 'scoutName': String, 'teamNumber': int}...] // if teamNumber == -1, teamNumber returned null } '''
Client to Server
{
'type': "contribution"
'CID': int,
'SID': int,
'objects': String, // '+' for addition to stack, '-' for subtraction from stack, and 'x' for knocked over removal
'time': int,
'autonomous': boolean
}
Server to Client
{
'updates': JSON
}
Client to Server
{
'type': "wazup"
'CID': int
}
Server to Client
{
'updates': JSON
}
Supervisor to Server '''javascript { 'type': "disconnectClient" 'disconnectCID': int } ''' Server to Supervisor '''javascript { 'type': "status" 'status': "ok" } '''