cell

package module
v0.0.0-...-71991b2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

README

JDSU CellAdvisor RESTful API

JDSU CellAdvisor API by Go Language

CellAdvisor API

GoDoc

RESTful API Implementation

GoDoc

RESTful API Usage

func main(){

 // BuildCellAdvisorRestfulAPI functions get argumets 
 // 1. The number of TCP connections for API
 // 2. CellAdvisor IP 
 // 3. Heartbeat cheking period
 // for example, 

 server := restful.NewCellAdvisorServer(4, "192.168.0.1", time.Second*10)
 http.Handle("/api/", server)
 log.Fatal(http.ListenAndServe(":80", nil))

// Now you could access 
// SCPI command: http://{celladvisorIP}:{port}/api/scpi/{keyp|youch}
// Screen capture http://{celladvisorIP}:{port}/api/screen/{refresh_screen|screen}

}

Maintainer

[email protected]

License

MIT

Documentation

Overview

Package cell provides api connections between JDSU CellAdvisor Devices

Index

Constants

This section is empty.

Variables

View Source
var (
	//JDProtocolPort represents Port number which CellAdviosr TCP Connection uses
	JDProtocolPort = ":66"
)

Functions

This section is empty.

Types

type CellAdvisor

type CellAdvisor struct {
	// contains filtered or unexported fields
}

CellAdvisor represents connection status with JDSU CellAdvisor devices It could only made by NewCellAdvisor(ip string) function

func NewCellAdvisor

func NewCellAdvisor(ip string) CellAdvisor

NewCellAdvisor creates new CellAdvior object with given ip address

func (CellAdvisor) GetInterferencePower

func (cl CellAdvisor) GetInterferencePower() (*InterferencePower, error)

GetInterferencePower returning current interference power array with json format

func (CellAdvisor) GetMessage

func (cl CellAdvisor) GetMessage() ([]byte, error)

GetMessage receive data right after it send request with SendMessage it returns the data and followed error if any

func (CellAdvisor) GetScreen

func (cl CellAdvisor) GetScreen() ([]byte, error)

GetScreen returning current devices jpeg screenshot

func (CellAdvisor) GetStatusMessage

func (cl CellAdvisor) GetStatusMessage() (string, error)

GetStatusMessage returning a heartbeat signal message from CellAdvisor

func (*CellAdvisor) Reinitialize

func (cl *CellAdvisor) Reinitialize()

func (CellAdvisor) SendMessage

func (cl CellAdvisor) SendMessage(cmd byte, data string) (int, error)

SendMessage send single cmd byte, and data strings and returing the number of bytes send and followed error if any

func (CellAdvisor) SendSCPI

func (cl CellAdvisor) SendSCPI(scpicmd string) (int, error)

SendSCPI sends SCPI commands to CellAdvisor devices (http://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments)

type InterferencePower

type InterferencePower struct {
	// Unit represents real unit of following float array
	Unit string `json:"Unit"`
	// PowerTrace is measured power array based on frequency plan
	Powertrace []float32 `json:"Powertrace"`
}

InterferencePower represents interferences data given by CellAdvisor

Directories

Path Synopsis
Package restful provides RESTful API features to CellAdvisor
Package restful provides RESTful API features to CellAdvisor

Jump to

Keyboard shortcuts

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