Documentation
¶
Index ¶
Constants ¶
const ( CpdlcRATypeR = "R" // C->P Expects "ROGER" CpdlcRATypeWU = "WU" // C->P Expects "WILCO"/"UNABLE" CpdlcRATypeAN = "AN" // C->P Expects "AFFIRM"/"NEGATIVE" CpdlcRATypeNE = "NE" // C->P Self-closing (Not-Enabled) CpdlcRATypeY = "Y" // P->C Expects Controller Response CpdlcRATypeN = "N" // P->C Self-closing (No response expected) )
const ( MsgTypeProgress = MsgType("progress") MsgTypeCPDLC = MsgType("cpdlc") MsgTypeTelex = MsgType("telex") MsgTypePing = MsgType("ping") MsgTypePosReq = MsgType("posreq") MsgTypePosition = MsgType("position") MsgTypeDataReq = MsgType("datareq") MsgTypePoll = MsgType("poll") MsgTypePeek = MsgType("peek") MsgTypeAdsC = MsgType("ads-c") )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AcarsError ¶
type AcarsError struct {
// contains filtered or unexported fields
}
this type of error is thrown by the acars service
func (*AcarsError) Error ¶
func (err *AcarsError) Error() string
type CpdlcMessage ¶
type CpdlcMessage struct {
ID int
ReferenceID *int
RAType string
Body CpdlcString
}
func DecodeCpdlcMessage ¶
func DecodeCpdlcMessage(msgIn string) (cpdlc *CpdlcMessage, err error)
DecodeCpdlcMessage translates a multipart CPDLC into a cpdlc message
func (*CpdlcMessage) Decode ¶
func (cpdlc *CpdlcMessage) Decode(msgIn string) (err error)
func (*CpdlcMessage) WireString ¶
func (cpdlc *CpdlcMessage) WireString() string
type CpdlcString ¶
type CpdlcString string
A CpdlcString is an Hoppie's ACARS encoded CPDLC message with it's native encoding
func NewCpdlcString ¶
func NewCpdlcString(strIn string) CpdlcString
NewCpdlcString encodes a platform neutral string into Hoppie's CPDLC format
func (CpdlcString) String ¶
func (str CpdlcString) String() string
String returns the platform neutral encoding
type Message ¶
type Message struct {
From string // sending station ID
Type MsgType // message type
Message string // payload
}
Message represents a single subpayload from an ACARS server (as part of a peek or poll)
func ParseMessage ¶
ParseMessage takes a raw message (as recieved from the server) and parses it into our internal Message format
type PollResponse ¶
type Request ¶
type Server ¶
Server represents all of the necessary state to talk to Hoppie's ACARS
func New ¶
New creates a new Server with which you can communicate with an ACARS server.
It will validate the URL provided in baseUrl. It currently does not validate the logon.
func (*Server) Do ¶
Do performs an ACARS operation.
req contains the fully populated ACARS request (logon, from, to, type, packet) resp contains the data sent back by the server encapsulated as a tclmanip.TclList. err contains the error if one was encountered during the request.
func (*Server) Peek ¶
Peek performs an ACARS Peek (fetch without update)
messages contains the list of responses provided by the server