More work on ASN.1 protocol spec.
This commit is contained in:
+117
-3
@@ -44,7 +44,18 @@ PokerTHMessage ::= CHOICE {
|
|||||||
playersTurnMessage PlayersTurnMessage,
|
playersTurnMessage PlayersTurnMessage,
|
||||||
myActionRequestMessage MyActionRequestMessage,
|
myActionRequestMessage MyActionRequestMessage,
|
||||||
yourActionRejectedMessage YourActionRejectedMessage,
|
yourActionRejectedMessage YourActionRejectedMessage,
|
||||||
playersActionDoneMessage PlayersActionDoneMessage
|
playersActionDoneMessage PlayersActionDoneMessage,
|
||||||
|
dealFlopCardsMessage DealFlopCardsMessage,
|
||||||
|
dealTurnCardMessage DealTurnCardMessage,
|
||||||
|
dealRiverCardMessage DealRiverCardMessage,
|
||||||
|
allInShowCardsMessage AllInShowCardsMessage,
|
||||||
|
endOfHandMessage EndOfHandMessage,
|
||||||
|
endOfGameMessage EndOfGameMessage,
|
||||||
|
statisticsMessage StatisticsMessage,
|
||||||
|
chatRequestMessage ChatRequestMessage,
|
||||||
|
chatMessage ChatMessage,
|
||||||
|
dialogMessage DialogMessage,
|
||||||
|
errorMessage ErrorMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
InitMessage ::= [APPLICATION 0] SEQUENCE {
|
InitMessage ::= [APPLICATION 0] SEQUENCE {
|
||||||
@@ -297,8 +308,7 @@ GameStartMessage ::= [APPLICATION 15] SEQUENCE {
|
|||||||
|
|
||||||
HandStartMessage ::= [APPLICATION 16] SEQUENCE {
|
HandStartMessage ::= [APPLICATION 16] SEQUENCE {
|
||||||
gameId NonZeroId,
|
gameId NonZeroId,
|
||||||
yourFirstCard Card,
|
yourCards SEQUENCE SIZE(2) OF Card,
|
||||||
yourSecondCard Card,
|
|
||||||
smallBlind INTEGER(1..20001)
|
smallBlind INTEGER(1..20001)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,6 +348,108 @@ PlayersActionDoneMessage ::= [APPLICATION 20] SEQUENCE {
|
|||||||
minimumRaise INTEGER(0..10000000) -- TODO
|
minimumRaise INTEGER(0..10000000) -- TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DealFlopCardsMessage ::= [APPLICATION 21] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
flopCards SEQUENCE SIZE(3) OF Card
|
||||||
|
}
|
||||||
|
|
||||||
|
DealTurnCardMessage ::= [APPLICATION 22] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
turnCard Card
|
||||||
|
}
|
||||||
|
|
||||||
|
DealRiverCardMessage ::= [APPLICATION 23] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
riverCard Card
|
||||||
|
}
|
||||||
|
|
||||||
|
AllInShowCardsMessage ::= [APPLICATION 24] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
playersAllIn SEQUENCE SIZE(1..10) OF PlayerAllIn
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerAllIn ::= SEQUENCE {
|
||||||
|
playerId NonZeroId,
|
||||||
|
allInCards SEQUENCE SIZE(2) OF Card
|
||||||
|
}
|
||||||
|
|
||||||
|
EndOfHandMessage ::= [APPLICATION 25] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
endOfHandType CHOICE {
|
||||||
|
endOfHandShowCards [0] EndOfHandShowCards,
|
||||||
|
endOfHandHideCards [1] EndOfHandHideCards
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EndOfHandShowCards ::= SEQUENCE {
|
||||||
|
playerResults SEQUENCE SIZE(1..10) OF PlayerResult
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerResult ::= SEQUENCE {
|
||||||
|
playerId NonZeroId,
|
||||||
|
resultCards SEQUENCE SIZE(2) OF Card,
|
||||||
|
bestHandPosition SEQUENCE SIZE(5) OF INTEGER, -- TODO size restrictions
|
||||||
|
cardsValue INTEGER,
|
||||||
|
moneyWon INTEGER(0..10000000),
|
||||||
|
playerMoney INTEGER(0..10000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
EndOfHandHideCards ::= SEQUENCE {
|
||||||
|
playerId NonZeroId,
|
||||||
|
moneyWon INTEGER(0..10000000),
|
||||||
|
playerMoney INTEGER(0..10000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
EndOfGameMessage ::= [APPLICATION 26] SEQUENCE {
|
||||||
|
gameId NonZeroId,
|
||||||
|
winnerPlayerId NonZeroId
|
||||||
|
}
|
||||||
|
|
||||||
|
StatisticsMessage ::= [APPLICATION 128] SEQUENCE {
|
||||||
|
statisticsData SEQUENCE SIZE(1..32) OF StatisticsData
|
||||||
|
}
|
||||||
|
|
||||||
|
StatisticsData ::= SEQUENCE {
|
||||||
|
statisticsType ENUMERATED {
|
||||||
|
statNumberOfPlayers (1)
|
||||||
|
},
|
||||||
|
statisticsValue INTEGER
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatRequestMessage ::= [APPLICATION 129] SEQUENCE {
|
||||||
|
gameId Id,
|
||||||
|
chatText UTF8String
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatMessage ::= [APPLICATION 130] SEQUENCE {
|
||||||
|
playerId Id,
|
||||||
|
gameId Id,
|
||||||
|
chatText UTF8String
|
||||||
|
}
|
||||||
|
|
||||||
|
DialogMessage ::= [APPLICATION 131] SEQUENCE {
|
||||||
|
notificationText UTF8String
|
||||||
|
}
|
||||||
|
|
||||||
|
ErrorMessage ::= [APPLICATION 255] SEQUENCE {
|
||||||
|
errorReason ENUMERATED {
|
||||||
|
errorReserved (0),
|
||||||
|
errorInitVersionNotSupported (1),
|
||||||
|
errorInitServerFull (2),
|
||||||
|
errorInitAuthFailure (3),
|
||||||
|
errorInitPlayerNameInUse (4),
|
||||||
|
errorInitInvalidPlayerName (5),
|
||||||
|
errorInitServerMaintenance (6),
|
||||||
|
errorAvatarTooLarge (7),
|
||||||
|
errorAvatarUploadBlocked (8),
|
||||||
|
errorInvalidPacket (256),
|
||||||
|
errorInvalidState (257),
|
||||||
|
errorKickedFromServer (258),
|
||||||
|
errorBannedFromServer (259),
|
||||||
|
errorSessionTimeout (260)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GameState ::= ENUMERATED {
|
GameState ::= ENUMERATED {
|
||||||
statePreflop (0),
|
statePreflop (0),
|
||||||
stateFlop (1),
|
stateFlop (1),
|
||||||
@@ -359,6 +471,8 @@ PlayerAction ::= ENUMERATED {
|
|||||||
|
|
||||||
NonZeroId ::= INTEGER(1..4294967295)
|
NonZeroId ::= INTEGER(1..4294967295)
|
||||||
|
|
||||||
|
Id ::= INTEGER(0..4294967295)
|
||||||
|
|
||||||
Guid ::= INTEGER(1..4294967295) -- TODO
|
Guid ::= INTEGER(1..4294967295) -- TODO
|
||||||
|
|
||||||
Card ::= INTEGER(0..51)
|
Card ::= INTEGER(0..51)
|
||||||
|
|||||||
Reference in New Issue
Block a user