Added testing and rewrite serializer
Signed-off-by: Alexander Lazarenko <kerblif@unprism.ru>
This commit is contained in:
@ -1,5 +1,41 @@
|
||||
package n9m
|
||||
|
||||
type NetConnectionType uint
|
||||
|
||||
const (
|
||||
NetConnectionWired NetConnectionType = iota
|
||||
NetConnectionWireless
|
||||
)
|
||||
|
||||
type TimeShiftSupportFlag uint8
|
||||
|
||||
const (
|
||||
TimeShiftNotSupported TimeShiftSupportFlag = iota
|
||||
TimeShiftSupported
|
||||
)
|
||||
|
||||
type FileSystemVersionNumber uint8
|
||||
|
||||
const (
|
||||
FileSystemVersion4 FileSystemVersionNumber = iota
|
||||
FileSystemVersion5
|
||||
)
|
||||
|
||||
type CertificateConnectRequest struct {
|
||||
Net NetConnectionType `json:"NET"`
|
||||
SerialNumber string `json:"DNSO"`
|
||||
DeviceName string `json:"DEVNAME"`
|
||||
ChannelsNumber uint `json:"CHANNEL"`
|
||||
LicensePlate string `json:"CARNUM"`
|
||||
DeviceNumber string `json:"AUTONO"`
|
||||
VehicleNumber string `json:"AUTOCAR"`
|
||||
TimeShiftSupport TimeShiftSupportFlag `json:"TSE"`
|
||||
FileSystemVersion FileSystemVersionNumber `json:"FSV"`
|
||||
ICCID string `json:"ICCID"`
|
||||
EvidenceSupport string `json:"EV"`
|
||||
}
|
||||
|
||||
/*
|
||||
func (e *Package) RequestConnect(session string, serial string, numOfCams int) {
|
||||
e.Payload = map[string]any{
|
||||
"MODULE": "CERTIFICATE",
|
||||
@ -39,3 +75,5 @@ func (e *Package) ResponseCertificateConnect(Sid string) {
|
||||
"SESSION": Sid,
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
Reference in New Issue
Block a user