Documentation ¶
Index ¶
- Constants
- func GetDpllType(tp uint32) string
- func GetLockStatus(ls uint32) string
- func GetMode(md uint32) string
- func GetPinCapabilities(c uint32) string
- func GetPinDirection(d uint32) string
- func GetPinInfoHR(reply *DoPinGetReply) ([]byte, error)
- func GetPinState(s uint32) string
- func GetPinType(tp uint32) string
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) DoDeviceGet(req DoDeviceGetRequest) (*DoDeviceGetReply, error)
- func (c *Conn) DoDeviceIdGet(req DoDeviceIdGetRequest) (*DoDeviceIdGetReply, error)
- func (c *Conn) DoPinGet(req DoPinGetRequest) (*DoPinGetReply, error)
- func (c *Conn) DumpDeviceGet() ([]*DoDeviceGetReply, error)
- func (c *Conn) DumpPinGet() ([]*DoPinGetReply, error)
- func (c *Conn) GetGenetlinkConn() *genetlink.Conn
- func (c *Conn) GetGenetlinkFamily() genetlink.Family
- func (c *Conn) GetMcastGroupId(mcGroup string) (id uint32, found bool)
- type DoDeviceGetReply
- type DoDeviceGetRequest
- type DoDeviceIdGetReply
- type DoDeviceIdGetRequest
- type DoPinGetReply
- type DoPinGetReplyHR
- type DoPinGetRequest
- type DpllStatusHR
- type FrequencyRange
- type PinParentDevice
- type PinParentDeviceHR
- type PinParentPin
- type PinParentPinHR
Constants ¶
const ( DPLL_A_TYPES = iota DPLL_A_ID DPLL_A_MODULE_NAME DPLL_A_PAD DPLL_A_CLOCK_ID DPLL_A_MODE DPLL_A_MODE_SUPPORTED DPLL_A_LOCK_STATUS DPLL_A_TEMP DPLL_A_TYPE DPLL_A_MAX = __DPLL_A_MAX - 1 )
const ( DPLL_A_PIN_TYPES = iota DPLL_A_PIN_ID DPLL_A_PIN_PARENT_ID DPLL_A_PIN_MODULE_NAME DPLL_A_PIN_PAD DPLL_A_PIN_CLOCK_ID DPLL_A_PIN_BOARD_LABEL DPLL_A_PIN_PANEL_LABEL DPLL_A_PIN_PACKAGE_LABEL DPLL_A_PIN_TYPE DPLL_A_PIN_DIRECTION DPLL_A_PIN_FREQUENCY DPLL_A_PIN_FREQUENCY_SUPPORTED DPLL_A_PIN_FREQUENCY_MIN DPLL_A_PIN_FREQUENCY_MAX DPLL_A_PIN_PRIO DPLL_A_PIN_STATE DPLL_A_PIN_CAPABILITIES DPLL_A_PIN_PARENT_DEVICE DPLL_A_PIN_PARENT_PIN DPLL_A_PIN_PHASE_ADJUST_MIN DPLL_A_PIN_PHASE_ADJUST_MAX DPLL_A_PIN_PHASE_ADJUST DPLL_A_PIN_PHASE_OFFSET DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET DPLL_A_PIN_MAX = __DPLL_A_PIN_MAX - 1 )
const ( DPLL_CMDS = iota DPLL_CMD_DEVICE_ID_GET DPLL_CMD_DEVICE_GET DPLL_CMD_DEVICE_SET DPLL_CMD_DEVICE_CREATE_NTF DPLL_CMD_DEVICE_DELETE_NTF DPLL_CMD_DEVICE_CHANGE_NTF DPLL_CMD_PIN_ID_GET DPLL_CMD_PIN_GET DPLL_CMD_PIN_SET DPLL_CMD_PIN_CREATE_NTF DPLL_CMD_PIN_DELETE_NTF DPLL_CMD_PIN_CHANGE_NTF DPLL_CMD_MAX = (__DPLL_CMD_MAX - 1) )
const DPLL_MCGRP_MONITOR = "monitor"
const DPLL_PHASE_OFFSET_DIVIDER = 1000
const DPLL_TEMP_DIVIDER = 1000
Variables ¶
This section is empty.
Functions ¶
func GetLockStatus ¶
GetLockStatus returns DPLL lock status as a string
func GetPinCapabilities ¶
GetPinCapabilities returns DPLL pin capabilities as a csv
func GetPinDirection ¶
GetPinDirection returns DPLL pin direction as a string
func GetPinInfoHR ¶
func GetPinInfoHR(reply *DoPinGetReply) ([]byte, error)
GetPinInfoHR returns human-readable pin status
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
A Conn is a connection to netlink family "dpll".
func Dial ¶
Dial opens a Conn for netlink family "dpll". Any options are passed directly to the underlying netlink package.
func (*Conn) DoDeviceGet ¶
func (c *Conn) DoDeviceGet(req DoDeviceGetRequest) (*DoDeviceGetReply, error)
DoDeviceGet wraps the "device-get" operation: Get list of DPLL devices (dump) or attributes of a single dpll device
func (*Conn) DoDeviceIdGet ¶
func (c *Conn) DoDeviceIdGet(req DoDeviceIdGetRequest) (*DoDeviceIdGetReply, error)
DoDeviceIdGet wraps the "device-id-get" operation: Get id of dpll device that matches given attributes
func (*Conn) DoPinGet ¶
func (c *Conn) DoPinGet(req DoPinGetRequest) (*DoPinGetReply, error)
DoPinGet wraps the "pin-get" operation:
func (*Conn) DumpDeviceGet ¶
func (c *Conn) DumpDeviceGet() ([]*DoDeviceGetReply, error)
func (*Conn) DumpPinGet ¶
func (c *Conn) DumpPinGet() ([]*DoPinGetReply, error)
func (*Conn) GetGenetlinkConn ¶
GetGenetlinkConn exposes genetlink connection
func (*Conn) GetGenetlinkFamily ¶
GetGenetlinkFamily exposes genetlink family
type DoDeviceGetReply ¶
type DoDeviceGetReply struct { Id uint32 ModuleName string Mode uint32 ModeSupported uint32 LockStatus uint32 Temp int32 ClockId uint64 Type uint32 }
DoDeviceGetReply is used with the DoDeviceGet method.
func ParseDeviceReplies ¶
func ParseDeviceReplies(msgs []genetlink.Message) ([]*DoDeviceGetReply, error)
type DoDeviceGetRequest ¶
DoDeviceGetRequest is used with the DoDeviceGet method.
type DoDeviceIdGetReply ¶
type DoDeviceIdGetReply struct {
Id uint32
}
DoDeviceIdGetReply is used with the DoDeviceIdGet method.
type DoDeviceIdGetRequest ¶
type DoDeviceIdGetRequest struct { // TODO: field "ModuleName", type "string" ClockId uint64 Type uint8 }
DoDeviceIdGetRequest is used with the DoDeviceIdGet method.
type DoPinGetReply ¶
type DoPinGetReply struct { Id uint32 ClockId uint64 BoardLabel string PanelLabel string PackageLabel string Type uint32 Frequency uint64 FrequencySupported FrequencyRange Capabilities uint32 ParentDevice PinParentDevice ParentPin PinParentPin PhaseAdjustMin int32 PhaseAdjustMax int32 PhaseAdjust int32 FractionalFrequencyOffset int ModuleName string }
DoPinGetReply is used with the DoPinGet method.
func ParsePinReplies ¶
func ParsePinReplies(msgs []genetlink.Message) ([]*DoPinGetReply, error)
type DoPinGetReplyHR ¶
type DoPinGetReplyHR struct { Id uint32 `json:"id"` ClockId uint64 `json:"clockId"` BoardLabel string `json:"boardLabel"` PanelLabel string `json:"panelLabel"` PackageLabel string `json:"packageLabel"` Type string `json:"type"` Frequency uint64 `json:"frequency"` FrequencySupported FrequencyRange `json:"frequencySupported"` Capabilities string `json:"capabilities"` ParentDevice PinParentDeviceHR `json:"pinParentDevice"` ParentPin PinParentPinHR `json:"pinParentPin"` PhaseAdjustMin int32 `json:"phaseAdjustMin"` PhaseAdjustMax int32 `json:"phaseAdjustMax"` PhaseAdjust int32 `json:"phaseAdjust"` FractionalFrequencyOffset int `json:"fractionalFrequencyOffset"` ModuleName string `json:"moduleName"` }
DoPinGetReply is used with the DoPinGet method.
type DoPinGetRequest ¶
type DoPinGetRequest struct {
Id uint32
}
DoPinGetRequest is used with the DoPinGet method.
type DpllStatusHR ¶
type DpllStatusHR struct { Id uint32 ModuleName string Mode string ModeSupported string LockStatus string ClockId string Type string }
DpllStatusHR represents human-readable DPLL status
func GetDpllStatusHR ¶
func GetDpllStatusHR(reply *DoDeviceGetReply) DpllStatusHR
GetDpllStatusHR returns human-readable DPLL status
type FrequencyRange ¶
type FrequencyRange struct { FrequencyMin uint64 `json:"frequencyMin"` FrequencyMax uint64 `json:"frequencyMax"` }
FrequencyRange contains nested netlink attributes.
type PinParentDevice ¶
type PinParentDevice struct { ParentId uint32 Direction uint32 Prio uint32 State uint32 PhaseOffset int64 }
PinParentDevice contains nested netlink attributes.
type PinParentDeviceHR ¶
type PinParentDeviceHR struct { ParentId uint32 `json:"parentId"` Direction string `json:"direction"` Prio uint32 `json:"prio"` State string `json:"state"` PhaseOffset int64 `json:"phaseOffset"` }
PinParentDevice contains nested netlink attributes.
type PinParentPin ¶
PinParentPin contains nested netlink attributes.
type PinParentPinHR ¶
PinParentPin contains nested netlink attributes.