cphandler

package
v0.0.0-...-87d254f Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2016 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddReadings

func AddReadings(a *archiver.Archiver, req Request)

func CapnpToStruct

func CapnpToStruct(messages []SmapMessage) map[string]*archiver.SmapMessage

Takes in an array of CapnProto SmapMessage and converts each into the native SmapMessage type as defined by the archiver, and then returns a constructed map of (path, sMAP object)

func DoQuery

func DoQuery(a *archiver.Archiver, req Request)

func Handle

func Handle(a *archiver.Archiver, port int)

Types

type ReqQuery

type ReqQuery C.Struct

func AutoNewReqQuery

func AutoNewReqQuery(s *C.Segment) ReqQuery

func NewReqQuery

func NewReqQuery(s *C.Segment) ReqQuery

func NewRootReqQuery

func NewRootReqQuery(s *C.Segment) ReqQuery

func ReadRootReqQuery

func ReadRootReqQuery(s *C.Segment) ReqQuery

func (ReqQuery) MarshalJSON

func (s ReqQuery) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (ReqQuery) Query

func (s ReqQuery) Query() string

func (ReqQuery) SetQuery

func (s ReqQuery) SetQuery(v string)

type ReqQuery_List

type ReqQuery_List C.PointerList

func NewReqQueryList

func NewReqQueryList(s *C.Segment, sz int) ReqQuery_List

func (ReqQuery_List) At

func (s ReqQuery_List) At(i int) ReqQuery

func (ReqQuery_List) Len

func (s ReqQuery_List) Len() int

func (ReqQuery_List) Set

func (s ReqQuery_List) Set(i int, item ReqQuery)

func (ReqQuery_List) ToArray

func (s ReqQuery_List) ToArray() []ReqQuery

type ReqWriteData

type ReqWriteData C.Struct

func AutoNewReqWriteData

func AutoNewReqWriteData(s *C.Segment) ReqWriteData

func NewReqWriteData

func NewReqWriteData(s *C.Segment) ReqWriteData

func NewRootReqWriteData

func NewRootReqWriteData(s *C.Segment) ReqWriteData

func ReadRootReqWriteData

func ReadRootReqWriteData(s *C.Segment) ReqWriteData

func (ReqWriteData) MarshalJSON

func (s ReqWriteData) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (ReqWriteData) Messages

func (s ReqWriteData) Messages() SmapMessage_List

func (ReqWriteData) SetMessages

func (s ReqWriteData) SetMessages(v SmapMessage_List)

type ReqWriteData_List

type ReqWriteData_List C.PointerList

func NewReqWriteDataList

func NewReqWriteDataList(s *C.Segment, sz int) ReqWriteData_List

func (ReqWriteData_List) At

func (ReqWriteData_List) Len

func (s ReqWriteData_List) Len() int

func (ReqWriteData_List) Set

func (s ReqWriteData_List) Set(i int, item ReqWriteData)

func (ReqWriteData_List) ToArray

func (s ReqWriteData_List) ToArray() []ReqWriteData

type Request

type Request C.Struct

func AutoNewRequest

func AutoNewRequest(s *C.Segment) Request

func NewRequest

func NewRequest(s *C.Segment) Request

func NewRootRequest

func NewRootRequest(s *C.Segment) Request

func ReadRootRequest

func ReadRootRequest(s *C.Segment) Request

func (Request) Apikey

func (s Request) Apikey() string

func (Request) MarshalJSON

func (s Request) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (Request) Query

func (s Request) Query() ReqQuery

func (Request) SetApikey

func (s Request) SetApikey(v string)

func (Request) SetQuery

func (s Request) SetQuery(v ReqQuery)

func (Request) SetVoid

func (s Request) SetVoid()

func (Request) SetWriteData

func (s Request) SetWriteData(v ReqWriteData)

func (Request) Which

func (s Request) Which() Request_Which

func (Request) WriteData

func (s Request) WriteData() ReqWriteData

type Request_List

type Request_List C.PointerList

func NewRequestList

func NewRequestList(s *C.Segment, sz int) Request_List

func (Request_List) At

func (s Request_List) At(i int) Request

func (Request_List) Len

func (s Request_List) Len() int

func (Request_List) Set

func (s Request_List) Set(i int, item Request)

func (Request_List) ToArray

func (s Request_List) ToArray() []Request

type Request_Which

type Request_Which uint16
const (
	REQUEST_VOID      Request_Which = 0
	REQUEST_WRITEDATA Request_Which = 1
	REQUEST_QUERY     Request_Which = 2
)

type Response

type Response C.Struct

func AutoNewResponse

func AutoNewResponse(s *C.Segment) Response

func NewResponse

func NewResponse(s *C.Segment) Response

func NewRootResponse

func NewRootResponse(s *C.Segment) Response

func ReadRootResponse

func ReadRootResponse(s *C.Segment) Response

func (Response) MarshalJSON

func (s Response) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (Response) Messages

func (s Response) Messages() SmapMessage_List

func (Response) SetMessages

func (s Response) SetMessages(v SmapMessage_List)

func (Response) SetStatus

func (s Response) SetStatus(v StatusCode)

func (Response) Status

func (s Response) Status() StatusCode

type Response_List

type Response_List C.PointerList

func NewResponseList

func NewResponseList(s *C.Segment, sz int) Response_List

func (Response_List) At

func (s Response_List) At(i int) Response

func (Response_List) Len

func (s Response_List) Len() int

func (Response_List) Set

func (s Response_List) Set(i int, item Response)

func (Response_List) ToArray

func (s Response_List) ToArray() []Response

type SmapMessage

type SmapMessage C.Struct

func AutoNewSmapMessage

func AutoNewSmapMessage(s *C.Segment) SmapMessage

func NewRootSmapMessage

func NewRootSmapMessage(s *C.Segment) SmapMessage

func NewSmapMessage

func NewSmapMessage(s *C.Segment) SmapMessage

func ReadRootSmapMessage

func ReadRootSmapMessage(s *C.Segment) SmapMessage

func (SmapMessage) Contents

func (s SmapMessage) Contents() C.TextList

func (SmapMessage) MarshalJSON

func (s SmapMessage) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (SmapMessage) Metadata

func (s SmapMessage) Metadata() SmapMessagePair_List

func (SmapMessage) Path

func (s SmapMessage) Path() string

func (SmapMessage) Properties

func (s SmapMessage) Properties() SmapMessagePair_List

func (SmapMessage) Readings

func (s SmapMessage) Readings() SmapMessageReading_List

func (SmapMessage) SetContents

func (s SmapMessage) SetContents(v C.TextList)

func (SmapMessage) SetMetadata

func (s SmapMessage) SetMetadata(v SmapMessagePair_List)

func (SmapMessage) SetPath

func (s SmapMessage) SetPath(v string)

func (SmapMessage) SetProperties

func (s SmapMessage) SetProperties(v SmapMessagePair_List)

func (SmapMessage) SetReadings

func (s SmapMessage) SetReadings(v SmapMessageReading_List)

func (SmapMessage) SetUuid

func (s SmapMessage) SetUuid(v []byte)

func (SmapMessage) Uuid

func (s SmapMessage) Uuid() []byte

type SmapMessagePair

type SmapMessagePair C.Struct

func AutoNewSmapMessagePair

func AutoNewSmapMessagePair(s *C.Segment) SmapMessagePair

func NewRootSmapMessagePair

func NewRootSmapMessagePair(s *C.Segment) SmapMessagePair

func NewSmapMessagePair

func NewSmapMessagePair(s *C.Segment) SmapMessagePair

func ReadRootSmapMessagePair

func ReadRootSmapMessagePair(s *C.Segment) SmapMessagePair

func (SmapMessagePair) Key

func (s SmapMessagePair) Key() string

func (SmapMessagePair) MarshalJSON

func (s SmapMessagePair) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (SmapMessagePair) SetKey

func (s SmapMessagePair) SetKey(v string)

func (SmapMessagePair) SetValue

func (s SmapMessagePair) SetValue(v string)

func (SmapMessagePair) Value

func (s SmapMessagePair) Value() string

type SmapMessagePair_List

type SmapMessagePair_List C.PointerList

func NewSmapMessagePairList

func NewSmapMessagePairList(s *C.Segment, sz int) SmapMessagePair_List

func (SmapMessagePair_List) At

func (SmapMessagePair_List) Len

func (s SmapMessagePair_List) Len() int

func (SmapMessagePair_List) Set

func (s SmapMessagePair_List) Set(i int, item SmapMessagePair)

func (SmapMessagePair_List) ToArray

func (s SmapMessagePair_List) ToArray() []SmapMessagePair

type SmapMessageReading

type SmapMessageReading C.Struct

func AutoNewSmapMessageReading

func AutoNewSmapMessageReading(s *C.Segment) SmapMessageReading

func NewRootSmapMessageReading

func NewRootSmapMessageReading(s *C.Segment) SmapMessageReading

func NewSmapMessageReading

func NewSmapMessageReading(s *C.Segment) SmapMessageReading

func ReadRootSmapMessageReading

func ReadRootSmapMessageReading(s *C.Segment) SmapMessageReading

func (SmapMessageReading) Data

func (s SmapMessageReading) Data() float64

func (SmapMessageReading) MarshalJSON

func (s SmapMessageReading) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (SmapMessageReading) SetData

func (s SmapMessageReading) SetData(v float64)

func (SmapMessageReading) SetTime

func (s SmapMessageReading) SetTime(v uint64)

func (SmapMessageReading) Time

func (s SmapMessageReading) Time() uint64

type SmapMessageReading_List

type SmapMessageReading_List C.PointerList

func NewSmapMessageReadingList

func NewSmapMessageReadingList(s *C.Segment, sz int) SmapMessageReading_List

func (SmapMessageReading_List) At

func (SmapMessageReading_List) Len

func (s SmapMessageReading_List) Len() int

func (SmapMessageReading_List) Set

func (SmapMessageReading_List) ToArray

type SmapMessage_List

type SmapMessage_List C.PointerList

func NewSmapMessageList

func NewSmapMessageList(s *C.Segment, sz int) SmapMessage_List

func (SmapMessage_List) At

func (SmapMessage_List) Len

func (s SmapMessage_List) Len() int

func (SmapMessage_List) Set

func (s SmapMessage_List) Set(i int, item SmapMessage)

func (SmapMessage_List) ToArray

func (s SmapMessage_List) ToArray() []SmapMessage

type StatusCode

type StatusCode uint16
const (
	STATUSCODE_OK            StatusCode = 0
	STATUSCODE_INTERNALERROR StatusCode = 1
)

func StatusCodeFromString

func StatusCodeFromString(c string) StatusCode

func (StatusCode) MarshalJSON

func (s StatusCode) MarshalJSON() (bs []byte, err error)

capn.JSON_enabled == false so we stub MarshallJSON().

func (StatusCode) String

func (c StatusCode) String() string

type StatusCode_List

type StatusCode_List C.PointerList

func NewStatusCodeList

func NewStatusCodeList(s *C.Segment, sz int) StatusCode_List

func (StatusCode_List) At

func (s StatusCode_List) At(i int) StatusCode

func (StatusCode_List) Len

func (s StatusCode_List) Len() int

func (StatusCode_List) ToArray

func (s StatusCode_List) ToArray() []StatusCode

Jump to

Keyboard shortcuts

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