Documentation
¶
Index ¶
Constants ¶
View Source
const CRLF = "\r\n"
View Source
const RET_ERXUDP = "ERXUDP" // UDP受信イベント
View Source
const RET_FAIL = "FAIL ER"
View Source
const RET_JOIN_COMPLETE = "EVENT 25 " // SKJOIN に対する応答。
View Source
const RET_OK = "OK"
View Source
const RET_PAN_ADDR = "Addr:"
View Source
const RET_PAN_CHANNEL = "Channel:"
PANDESC
View Source
const RET_PAN_CHANNEL_PAGE = "Channel Page:"
View Source
const RET_PAN_ID = "Pan ID:"
View Source
const RET_PAN_LQI = "LQI:"
View Source
const RET_PAN_PAIR_ID = "PairID:"
View Source
const RET_SCAN_COMPLETE = "EVENT 22 " // SKSCAN終了
View Source
const RET_SCAN_FOUND = "EPANDESC" // SKSCANの機器情報が取得された場合
Variables ¶
View Source
var LAST_TID uint16 = 1000
View Source
var LONG_TIMEOUT_DURATION = 60 * time.Second
View Source
var RET_STOP_WORDS = []string{RET_OK, RET_FAIL}
一般的な応答ワード [OK, FAIL]
View Source
var STD_TIMEOUT_DURATION = 15 * time.Second
Functions ¶
func GetSmartMeterInitialData ¶
一度だけ取得すればあとは変わらないものを取得して、パーサーに渡す
func InitializeBrouteConnection ¶
アクティブスキャン〜Bルート接続完了までを実行する @return スマートメーターのipv6アドレス
func StartConnection ¶
func StartConnection() error
Types ¶
type ElectricData ¶
{ RphaseAmp float64 // R相電流アンペア Signed Short (0.1A単位) TphaseAmp float64 // T相電流アンペア Signed Short (0.1A単位) TotalAmp float64 // 合計電流アンペア Signed Short (0.1A単位) DeltakWh float64 // 積算電力量 Watt int // 瞬間電力量 }
func GetDeltaConsumptionData ¶
func GetDeltaConsumptionData(ipv6 string) (ElectricData, error)
瞬間電力消費量を取得する
func GetNowConsumptionData ¶
func GetNowConsumptionData(ipv6 string) (ElectricData, error)
瞬間電力消費量を取得する
Click to show internal directories.
Click to hide internal directories.