From e178be32c8ae75521fd4918b719cae75990461c4 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 16 Dec 2021 20:31:41 +0100 Subject: [PATCH] Beginnings of telephony schemas --- protocols/Makefile | 2 +- protocols/schema-bundle.bin | 8 ++++++- protocols/schemas/hayes.prs | 41 +++++++++++++++++++++++++++++++++ protocols/schemas/telephony.prs | 2 ++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 protocols/schemas/hayes.prs create mode 100644 protocols/schemas/telephony.prs diff --git a/protocols/Makefile b/protocols/Makefile index 1efe0bd..a738837 100644 --- a/protocols/Makefile +++ b/protocols/Makefile @@ -4,5 +4,5 @@ clean: rm -f schema-bundle.bin schema-bundle.bin: schemas/*.prs - preserves-schemac schemas/*.prs > $@.tmp + preserves-schemac schemas > $@.tmp mv $@.tmp $@ diff --git a/protocols/schema-bundle.bin b/protocols/schema-bundle.bin index e7c1d9d..bbf6f6f 100644 --- a/protocols/schema-bundle.bin +++ b/protocols/schema-bundle.bin @@ -1 +1,7 @@ -´³bundle·µ³usersAndGroups„´³schema·³version‘³ definitions·³Spec´³orµµ± userAccount´³lit³user„„µ± systemAccount´³lit³system„„µ±id´³atom³ SignedInteger„„„„³Group´³rec´³lit³grent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³name´³named³name´³atom³String„„„„„„„³Account´³rec´³lit³pwent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³uid´³named³uid´³atom³ SignedInteger„„³home´³named³home´³atom³String„„³info´³named³info´³atom³String„„³name´³named³name´³atom³String„„³shell´³named³shell´³atom³String„„„„„„„³ EnsureGroup´³rec´³lit³ ensure-group„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„³ GroupMember´³rec´³lit³ group-member„´³tupleµ´³named³uid´³atom³ SignedInteger„„´³named³gid´³atom³ SignedInteger„„„„„³ EnsureAccount´³rec´³lit³ensure-account„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„„³ embeddedType€„„„„ \ No newline at end of file +´³bundle·µ³hayes„´³schema·³version‘³ definitions·³Result´³rec´³lit³result„´³tupleµ´³named³text´³atom³String„„´³named³tag´³refµ„³ MaybeString„„´³named³fields´³refµ„³ MaybeStrings„„„„„³CallType´³orµµ±voice´³lit³voice„„µ±data´³lit³data„„µ±fax´³lit³fax„„„„³ CallState´³orµµ±hold´³lit³hold„„µ±original´³lit³original„„µ±connect´³lit³connect„„µ±incoming´³lit³incoming„„µ±waiting´³lit³waiting„„µ±end´³lit³end„„µ±alerting´³lit³alerting„„„„³ +ActiveCall´³rec´³lit³ +call-state„´³tupleµ´³named³callId´³atom³ SignedInteger„„´³named³ direction´³refµ„³ CallDirection„„´³named³type´³refµ„³CallType„„´³named³peer´³atom³String„„´³named³peerNumberType´³refµ„³ +NumberType„„´³named³state´³refµ„³ CallState„„„„„³ +AnswerCall´³rec´³lit³ answer-call„´³tupleµ´³named³callId´³atom³ SignedInteger„„„„„³ +NumberType´³orµµ±unknown´³lit³unknown„„µ± international´³lit³ international„„µ±national´³lit³national„„„„³ MaybeString´³orµµ±present´³atom³String„„µ±absent´³lit€„„„„³ MaybeStrings´³orµµ±present´³seqof´³atom³String„„„µ±absent´³lit€„„„„³ ModemPresent´³rec´³lit³modem„´³tupleµ´³named³ +devicePath´³atom³String„„´³named³ dataspace´³embedded´³refµ„³InternalProtocol„„„„„„³ CallDirection´³orµµ±mo´³lit³mo„„µ±mt´³lit³mt„„„„³ CommandResult´³rec´³lit³command-result„´³tupleµ´³named³ commandText´³atom³String„„´³named³results´³seqof´³refµ„³Result„„„´³named³ finalResult´³atom³String„„„„„³DisconnectCall´³rec´³lit³disconnect-call„´³tupleµ´³named³callId´³atom³ SignedInteger„„„„„³ExecuteCommand´³rec´³lit³execute-command„´³tupleµ´³named³ commandText´³atom³String„„´³named³replyTo´³embedded´³refµ„³ CommandResult„„„„„„³InternalProtocol³any³UnsolicitedResultCode´³rec´³lit³ unsolicited„´³tupleµ´³named³result´³refµ„³Result„„„„„„³ embeddedType€„„µ³ telephony„´³schema·³version‘³ definitions·„³ embeddedType€„„µ³usersAndGroups„´³schema·³version‘³ definitions·³Spec´³orµµ± userAccount´³lit³user„„µ± systemAccount´³lit³system„„µ±id´³atom³ SignedInteger„„„„³Group´³rec´³lit³grent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³name´³named³name´³atom³String„„„„„„„³Account´³rec´³lit³pwent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³uid´³named³uid´³atom³ SignedInteger„„³home´³named³home´³atom³String„„³info´³named³info´³atom³String„„³name´³named³name´³atom³String„„³shell´³named³shell´³atom³String„„„„„„„³ EnsureGroup´³rec´³lit³ ensure-group„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„³ GroupMember´³rec´³lit³ group-member„´³tupleµ´³named³uid´³atom³ SignedInteger„„´³named³gid´³atom³ SignedInteger„„„„„³ EnsureAccount´³rec´³lit³ensure-account„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„„³ embeddedType€„„„„ \ No newline at end of file diff --git a/protocols/schemas/hayes.prs b/protocols/schemas/hayes.prs new file mode 100644 index 0000000..930c2e1 --- /dev/null +++ b/protocols/schemas/hayes.prs @@ -0,0 +1,41 @@ +version 1 . +; Definitions for the internal workings of the Hayes modem driver. + +; Assertion. Declares presence of a modem. +ModemPresent = . + +; TODO not yet properly specified +InternalProtocol = any . + +; Message. Sent when the modem sends us a "URC", an Unsolicited Result Code. +UnsolicitedResultCode = . + +; Assertion. Asks the modem to execute the given command. +ExecuteCommand = . + +; Assertion. Describes the result of a command execution. +CommandResult = . + +@> + > + > + > + > +]> +Result = . +MaybeString = @present string / @absent #f . +MaybeStrings = @present [string ...] / @absent #f . + +; Assertion. Describes an ongoing call. +ActiveCall = . +CallDirection = =mo / =mt . +CallType = =voice / =data / =fax . +NumberType = =unknown / =international / =national . +CallState = =hold / =original / =connect / =incoming / =waiting / =end / =alerting . + +; Message. Triggers call answering. +AnswerCall = . + +; Message. Triggers call rejection or disconnection. +DisconnectCall = . diff --git a/protocols/schemas/telephony.prs b/protocols/schemas/telephony.prs new file mode 100644 index 0000000..0d2446a --- /dev/null +++ b/protocols/schemas/telephony.prs @@ -0,0 +1,2 @@ +version 1 . +