Documentation
¶
Overview ¶
Package protocol implements the StorageManager protocol
Package protocol implements the StorageManager protocol ¶
Package protocol implements the StorageManager protocol
Index ¶
- Constants
- type Interface
- type Protocol
- func (protocol *Protocol) Endpoint() nex.EndpointInterface
- func (protocol *Protocol) HandlePacket(packet nex.PacketInterface)
- func (protocol *Protocol) SetEndpoint(endpoint nex.EndpointInterface)
- func (protocol *Protocol) SetHandlerAcquireCardID(...)
- func (protocol *Protocol) SetHandlerActivateWithCardID(...)
Constants ¶
View Source
const ( // ProtocolID is the protocol ID for the StorageManager protocol ProtocolID = 0x6E // MethodAcquireCardID is the method ID for the method AcquireCardID MethodAcquireCardID = 0x4 // MethodActivateWithCardID is the method ID for the method ActivateWithCardID MethodActivateWithCardID = 0x5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Endpoint() nex.EndpointInterface SetEndpoint(endpoint nex.EndpointInterface) SetHandlerAcquireCardID(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error)) SetHandlerActivateWithCardID(handler func(err error, packet nex.PacketInterface, callID uint32, unknown types.UInt8, cardID types.UInt64) (*nex.RMCMessage, *nex.Error)) }
Interface implements the methods present on the StorageManager protocol struct
type Protocol ¶
type Protocol struct { AcquireCardID func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error) ActivateWithCardID func(err error, packet nex.PacketInterface, callID uint32, unknown types.UInt8, cardID types.UInt64) (*nex.RMCMessage, *nex.Error) Patches nex.ServiceProtocol PatchedMethods []uint32 // contains filtered or unexported fields }
Protocol stores all the RMC method handlers for the StorageManager protocol and listens for requests
func (*Protocol) Endpoint ¶
func (protocol *Protocol) Endpoint() nex.EndpointInterface
Endpoint returns the endpoint implementing the protocol
func (*Protocol) HandlePacket ¶
func (protocol *Protocol) HandlePacket(packet nex.PacketInterface)
HandlePacket sends the packet to the correct RMC method handler
func (*Protocol) SetEndpoint ¶
func (protocol *Protocol) SetEndpoint(endpoint nex.EndpointInterface)
SetEndpoint sets the endpoint implementing the protocol
func (*Protocol) SetHandlerAcquireCardID ¶
func (protocol *Protocol) SetHandlerAcquireCardID(handler func(err error, packet nex.PacketInterface, callID uint32) (*nex.RMCMessage, *nex.Error))
SetHandlerAcquireCardID sets the handler for the AcquireCardID method
func (*Protocol) SetHandlerActivateWithCardID ¶
func (protocol *Protocol) SetHandlerActivateWithCardID(handler func(err error, packet nex.PacketInterface, callID uint32, unknown types.UInt8, cardID types.UInt64) (*nex.RMCMessage, *nex.Error))
SetHandlerActivateWithCardID sets the handler for the ActivateWithCardID method
Click to show internal directories.
Click to hide internal directories.