synit/protocols/schemas/hayes.prs

42 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-12-16 19:31:41 +00:00
version 1 .
; Definitions for the internal workings of the Hayes modem driver.
; Assertion. Declares presence of a modem.
ModemPresent = <modem @devicePath string @dataspace #!InternalProtocol> .
; TODO not yet properly specified
InternalProtocol = any .
; Message. Sent when the modem sends us a "URC", an Unsolicited Result Code.
UnsolicitedResultCode = <unsolicited @result Result> .
; Assertion. Asks the modem to execute the given command.
ExecuteCommand = <execute-command @commandText string @replyTo #!CommandResult> .
; Assertion. Describes the result of a command execution.
CommandResult = <command-result @commandText string @results [Result ...] @finalResult string> .
@<examples [
<unsolicited <result "NO CARRIER" #f #f>>
<unsolicited <result "+CRING: VOICE" "CRING" ["VOICE"]>>
<unsolicited <result "+CLIP: \"+31655555555\",145,,,,0" "CLIP" ["+31655555555" "145" "" "" "" "0"]>>
<unsolicited <result "^DSCI: 2,1,4,0,+31655555555,145" "DSCI" ["2" "1" "4" "0" "+31655555555" "145"]>>
<unsolicited <result "+QIND: \"csq\",12,99" "QIND" ["csq" "12" "99"]>>
]>
Result = <result @text string @tag MaybeString @fields MaybeStrings> .
MaybeString = @present string / @absent #f .
MaybeStrings = @present [string ...] / @absent #f .
; Assertion. Describes an ongoing call.
ActiveCall = <call-state @callId int @direction CallDirection @type CallType @peer string @peerNumberType NumberType @state CallState> .
CallDirection = =mo / =mt .
CallType = =voice / =data / =fax .
NumberType = =unknown / =international / =national .
CallState = =hold / =original / =connect / =incoming / =waiting / =end / =alerting .
; Message. Triggers call answering.
AnswerCall = <answer-call @callId int> .
; Message. Triggers call rejection or disconnection.
DisconnectCall = <disconnect-call @callId int> .