messages

package
v0.0.0-...-3a1b8ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteCardRequest

type DeleteCardRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x52"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	CardNumber   uint32             `uhppote:"offset:8"`
}

type DeleteCardResponse

type DeleteCardResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x52"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Succeeded    bool               `uhppote:"offset:8"`
}

type DeleteCardsRequest

type DeleteCardsRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x54"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	MagicWord    uint32             `uhppote:"offset:8"`
}

type DeleteCardsResponse

type DeleteCardsResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x54"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Succeeded    bool               `uhppote:"offset:8"`
}

type FindDevicesRequest

type FindDevicesRequest struct {
	MsgType types.MsgType `uhppote:"value:0x94"`
}

type FindDevicesResponse

type FindDevicesResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x94"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	IpAddress    net.IP             `uhppote:"offset:8"`
	SubnetMask   net.IP             `uhppote:"offset:12"`
	Gateway      net.IP             `uhppote:"offset:16"`
	MacAddress   types.MacAddress   `uhppote:"offset:20"`
	Version      types.Version      `uhppote:"offset:26"`
	Date         types.Date         `uhppote:"offset:28"`
}

type GetCardByIDRequest

type GetCardByIDRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x5a"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	CardNumber   uint32             `uhppote:"offset:8"`
}

type GetCardByIDResponse

type GetCardByIDResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x5a"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	CardNumber   uint32             `uhppote:"offset:8"`
	From         *types.Date        `uhppote:"offset:12"`
	To           *types.Date        `uhppote:"offset:16"`
	Door1        bool               `uhppote:"offset:20"`
	Door2        bool               `uhppote:"offset:21"`
	Door3        bool               `uhppote:"offset:22"`
	Door4        bool               `uhppote:"offset:23"`
}

type GetCardByIndexRequest

type GetCardByIndexRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x5c"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Index        uint32             `uhppote:"offset:8"`
}

type GetCardByIndexResponse

type GetCardByIndexResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x5c"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	CardNumber   uint32             `uhppote:"offset:8"`
	From         *types.Date        `uhppote:"offset:12"`
	To           *types.Date        `uhppote:"offset:16"`
	Door1        bool               `uhppote:"offset:20"`
	Door2        bool               `uhppote:"offset:21"`
	Door3        bool               `uhppote:"offset:22"`
	Door4        bool               `uhppote:"offset:23"`
}

type GetCardsRequest

type GetCardsRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x58"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
}

type GetCardsResponse

type GetCardsResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x58"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Records      uint32             `uhppote:"offset:8"`
}

type GetDoorControlStateRequest

type GetDoorControlStateRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x82"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Door         uint8              `uhppote:"offset:8"`
}

type GetDoorControlStateResponse

type GetDoorControlStateResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x82"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Door         uint8              `uhppote:"offset:8"`
	ControlState uint8              `uhppote:"offset:9"`
	Delay        uint8              `uhppote:"offset:10"`
}

type GetEventIndexRequest

type GetEventIndexRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0xb4"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
}

type GetEventIndexResponse

type GetEventIndexResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0xb4"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Index        uint32             `uhppote:"offset:8"`
}

type GetEventRequest

type GetEventRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0xb0"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Index        uint32             `uhppote:"offset:8"`
}

type GetEventResponse

type GetEventResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0xb0"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Index        uint32             `uhppote:"offset:8"`
	Type         uint8              `uhppote:"offset:12"`
	Granted      bool               `uhppote:"offset:13"`
	Door         uint8              `uhppote:"offset:14"`
	DoorOpened   bool               `uhppote:"offset:15"`
	UserID       uint32             `uhppote:"offset:16"`
	Timestamp    types.DateTime     `uhppote:"offset:20"`
	Result       uint8              `uhppote:"offset:27"`
}

type GetListenerRequest

type GetListenerRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x92"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
}

type GetListenerResponse

type GetListenerResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x92"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Address      net.IP             `uhppote:"offset:8"`
	Port         uint16             `uhppote:"offset:12"`
}

type GetStatusRequest

type GetStatusRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x20"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
}

type GetStatusResponse

type GetStatusResponse struct {
	MsgType        types.MsgType      `uhppote:"value:0x20"`
	SerialNumber   types.SerialNumber `uhppote:"offset:4"`
	LastIndex      uint32             `uhppote:"offset:8"`
	EventType      byte               `uhppote:"offset:12"`
	Granted        bool               `uhppote:"offset:13"`
	Door           byte               `uhppote:"offset:14"`
	DoorOpened     bool               `uhppote:"offset:15"`
	UserID         uint32             `uhppote:"offset:16"`
	EventTimestamp types.DateTime     `uhppote:"offset:20"`
	EventResult    byte               `uhppote:"offset:27"`
	Door1State     bool               `uhppote:"offset:28"`
	Door2State     bool               `uhppote:"offset:29"`
	Door3State     bool               `uhppote:"offset:30"`
	Door4State     bool               `uhppote:"offset:31"`
	Door1Button    bool               `uhppote:"offset:32"`
	Door2Button    bool               `uhppote:"offset:33"`
	Door3Button    bool               `uhppote:"offset:34"`
	Door4Button    bool               `uhppote:"offset:35"`
	SystemState    byte               `uhppote:"offset:36"`
	SystemDate     types.SystemDate   `uhppote:"offset:51"`
	SystemTime     types.SystemTime   `uhppote:"offset:37"`
	PacketNumber   uint32             `uhppote:"offset:40"` // TODO unverified - trust at own risk
	Backup         uint32             `uhppote:"offset:44"` // TODO unverified - trust at own risk
	SpecialMessage byte               `uhppote:"offset:48"` // TODO unverified - trust at own risk
	Battery        byte               `uhppote:"offset:49"` // TODO unverified - trust at own risk
	FireAlarm      byte               `uhppote:"offset:50"` // TODO unverified - trust at own risk
}

type GetTimeRequest

type GetTimeRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x32"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
}

type GetTimeResponse

type GetTimeResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x32"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	DateTime     types.DateTime     `uhppote:"offset:8"`
}

type OpenDoorRequest

type OpenDoorRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x40"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Door         uint8              `uhppote:"offset:8"`
}

type OpenDoorResponse

type OpenDoorResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x40"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Succeeded    bool               `uhppote:"offset:8"`
}

type PutCardRequest

type PutCardRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x50"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	CardNumber   uint32             `uhppote:"offset:8"`
	From         types.Date         `uhppote:"offset:12"`
	To           types.Date         `uhppote:"offset:16"`
	Door1        bool               `uhppote:"offset:20"`
	Door2        bool               `uhppote:"offset:21"`
	Door3        bool               `uhppote:"offset:22"`
	Door4        bool               `uhppote:"offset:23"`
}

type PutCardResponse

type PutCardResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x50"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Succeeded    bool               `uhppote:"offset:8"`
}

type Request

type Request interface {
}

func UnmarshalRequest

func UnmarshalRequest(bytes []byte) (Request, error)

type Response

type Response interface {
}

func UnmarshalResponse

func UnmarshalResponse(bytes []byte) (Response, error)

type SetAddressRequest

type SetAddressRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x96"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Address      net.IP             `uhppote:"offset:8"`
	Mask         net.IP             `uhppote:"offset:12"`
	Gateway      net.IP             `uhppote:"offset:16"`
	MagicWord    uint32             `uhppote:"offset:20"`
}

type SetDoorControlStateRequest

type SetDoorControlStateRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x80"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Door         uint8              `uhppote:"offset:8"`
	ControlState uint8              `uhppote:"offset:9"`
	Delay        uint8              `uhppote:"offset:10"`
}

type SetDoorControlStateResponse

type SetDoorControlStateResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x80"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Door         uint8              `uhppote:"offset:8"`
	ControlState uint8              `uhppote:"offset:9"`
	Delay        uint8              `uhppote:"offset:10"`
}

type SetEventIndexRequest

type SetEventIndexRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0xb2"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Index        uint32             `uhppote:"offset:8"`
	MagicWord    uint32             `uhppote:"offset:12"`
}

type SetEventIndexResponse

type SetEventIndexResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0xb2"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Changed      bool               `uhppote:"offset:8"`
}

type SetListenerRequest

type SetListenerRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x90"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Address      net.IP             `uhppote:"offset:8"`
	Port         uint16             `uhppote:"offset:12"`
}

type SetListenerResponse

type SetListenerResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x90"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	Succeeded    bool               `uhppote:"offset:8"`
}

type SetTimeRequest

type SetTimeRequest struct {
	MsgType      types.MsgType      `uhppote:"value:0x30"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	DateTime     types.DateTime     `uhppote:"offset:8"`
}

type SetTimeResponse

type SetTimeResponse struct {
	MsgType      types.MsgType      `uhppote:"value:0x30"`
	SerialNumber types.SerialNumber `uhppote:"offset:4"`
	DateTime     types.DateTime     `uhppote:"offset:8"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL