Add some real messages to ASN.1 and handle pings on server

This commit is contained in:
2025-02-28 12:45:35 +00:00
parent fe8b1ef977
commit cdbef62e70
3 changed files with 39 additions and 8 deletions

View File

@@ -1,11 +1,40 @@
StudySystemProtocol DEFINITIONS EXPLICIT TAGS ::= BEGIN
ActivityType ::= ENUMERATED {
reading(0),
exercises(1)
}
Session ::= SEQUENCE {
subjectId INTEGER,
type ActivityType,
timestamp INTEGER,
minutes INTEGER
}
Request ::= CHOICE {
foo [0] NULL
ping [0] NULL,
listPrioritizedActivities [1] NULL,
logSession [2] Session
}
PrioritizedActivity ::= SEQUENCE {
subjectId INTEGER,
subjectName UTF8String,
type ActivityType,
priority INTEGER
}
Error ::= ENUMERATED {
invalidRequest(0),
invalidArguments(1),
serverError(2)
}
Response ::= CHOICE {
msg [0] UTF8String
error [0] Error,
ack [1] NULL,
prioritizedActivities [2] SEQUENCE OF PrioritizedActivity
}
END