ins

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Unlicense Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const ELSSEN_SAFETY_HOOK int = 2
View Source
const ELSSEN_TOXIC_GAS int = 3
View Source
const ELSSEN_WEARABLE_DEVICE int = 1
View Source
const METHOD_ERROR int = -1
View Source
const METHOD_MQTT int = 2
View Source
const METHOD_SOCKET int = 1
View Source
const METHOD_UNKNOWN int = 0

Variables

View Source
var BB_APPROACH_OBJECT = []byte{0x00, 0x0A}

접근 감지

View Source
var BB_EVENT_COLLISION = []byte{0x00, 0x09}

블랙박스 충돌 이벤트

View Source
var BB_FRONT_APPROACH = []byte{0x00, 0x05}

전방/후방 접근감지 파일

View Source
var BB_FRONT_COLLISION = []byte{0x00, 0x03}

전방/후방 충돌 파일

View Source
var BB_FRONT_VIDEO = []byte{0x00, 0x01}

전방/후방 영상 파일

View Source
var BB_RADAR_APPROACH = []byte{0x20, 0x01}

텔레필드 레이다(RADAR)

View Source
var BB_RAW_ACCELEROMETER = []byte{0x00, 0x07}

RAW 가속도 데이터 파일

View Source
var BB_REAR_APPROACH = []byte{0x00, 0x06}
View Source
var BB_REAR_COLLISION = []byte{0x00, 0x04}
View Source
var BB_REAR_VIDEO = []byte{0x00, 0x02}
View Source
var BB_RELAY_DISTANCE = []byte{0x01, 0x08}

중계 -> 집중

View Source
var BB_SMART_DISTANCE = []byte{0x02, 0x08}

스마트 -> 중계

View Source
var BB_UWB_LOCATION = []byte{0x00, 0x08}
View Source
var BB_WORKER_IDENTITY = []byte{0x30, 0x01}

에이브레인 작업자 식별

View Source
var BB_WRAPPED = []byte{0xF0, 0x00}

================================================================ 중첩 메시지

View Source
var BBx0000 = []byte{0x00, 0x00}
View Source
var BBx0001 = []byte{0x00, 0x01}
View Source
var BBx0002 = []byte{0x00, 0x02}
View Source
var BBx0003 = []byte{0x00, 0x03}
View Source
var BBx0004 = []byte{0x00, 0x04}
View Source
var BBx0005 = []byte{0x00, 0x05}
View Source
var BBx0006 = []byte{0x00, 0x06}
View Source
var BBx0007 = []byte{0x00, 0x07}
View Source
var BBx0008 = []byte{0x00, 0x08}
View Source
var BBx0009 = []byte{0x00, 0x09}
View Source
var BBx000A = []byte{0x00, 0x0A}
View Source
var BBx000B = []byte{0x00, 0x0B}
View Source
var BBx000C = []byte{0x00, 0x0C}
View Source
var BBx000D = []byte{0x00, 0x0D}
View Source
var BBx000E = []byte{0x00, 0x0E}
View Source
var BBx000F = []byte{0x00, 0x0F}
View Source
var CGW_COLLISION_RISK = []byte{0x00, 0x10}

RTLS 서버 & 충돌 예측 서버

View Source
var CODE_ABRAIN = []byte{0xAB, 0xAB}
View Source
var CODE_ELSSEN = []byte{0xEA, 0xCE}
View Source
var CODE_TELEFIELD = []byte{0x8F, 0x8F}
View Source
var CODE_WRAPPED = []byte{0xEF, 0xF0}
View Source
var CODE_YMTECH = []byte{0xEF, 0xFE}
View Source
var CONTROL_COMMAND = []byte{0x01, 0x01}
View Source
var CONTROL_DIAG = []byte{0x01, 0x02}
View Source
var GW_CENTER_STATUS_DANGERZONE = []byte{0x00, 0x84}

위험구역

View Source
var GW_CENTER_STATUS_FACTORY = []byte{0x00, 0x81}

제조현장

View Source
var GW_ELSSEN_SAFETY_HOOK = []byte{0x10, byte(ELSSEN_SAFETY_HOOK)}

건설 현장 안전고리

View Source
var GW_ELSSEN_TOXIC_GAS = []byte{0x10, byte(ELSSEN_TOXIC_GAS)}

건설 현장 유해가스

View Source
var GW_ELSSEN_WEARABLE_DEVICE = []byte{0x10, byte(ELSSEN_WEARABLE_DEVICE)}

건설 현장 생체

View Source
var GW_NAME_API_SERVER string = "보안 IoT 시스템"

보안 IoT 시스템 API 서버

View Source
var GW_NAME_BLACKBOX_DANGERZONE string = "위험구역 블랙박스"

위험구혁 블랙박스

View Source
var GW_NAME_BLACKBOX_FACTORY string = "제조현장 블랙박스"

제조현장 블랙박스

View Source
var GW_NAME_CENTER_DANGERZONE string = "위험구역 집중게이트웨이"

위험구역 집중 GW

View Source
var GW_NAME_CENTER_FACTORY string = "제조현장 집중게이트웨이"

제조현장 집중 GW

View Source
var GW_NAME_PORTABLE_CONSTRUCTION string = "건설현장 이동형게이트웨이"

건설현장 이동

View Source
var GW_NAME_RELAY_CONSTRUCTION string = "건설현장 중계게이트웨이"

건설현장 중계

View Source
var GW_NAME_RELAY_FACTORY string = "제조현장 중계게이트웨이"

제조현장 중계 GW

View Source
var GW_NAME_RELAY_PLATFORM string = "지능플랫폼 데이터릴레이"

지능형 플랫폼 릴레이

View Source
var GW_NAME_SERVER_PLATFORM string = "지능형프르랫폼 서버"

지능형 플랫폼 서버

View Source
var GW_NAME_SMART_DANGERZONE string = "위험구역 스마트게이트웨이"

위험구혁 스마트 GW

View Source
var GW_NAME_SMART_FACTORY string = "제조현장 스마트게이트웨이"

제조현장 스마트 GW

View Source
var GW_PORTABLE_STATUS_CONSTRUCTION = []byte{0x00, 0x86}

건설현장

View Source
var GW_RELAY_STATUS_CONSTRUCTION = []byte{0x00, 0x87}
View Source
var GW_RELAY_STATUS_FACTORY = []byte{0x00, 0x82}
View Source
var GW_SMART_STATUS_DANGERZONE = []byte{0x00, 0x85}
View Source
var GW_SMART_STATUS_FACTORY = []byte{0x00, 0x83}
View Source
var GW_TYPE_API_SERVER byte = 0x05

보안 IoT 시스템 API 서버

View Source
var GW_TYPE_BLACKBOX_DANGERZONE byte = 0x14

위험구혁 블랙박스

View Source
var GW_TYPE_BLACKBOX_FACTORY byte = 0x04

제조현장 블랙박스

View Source
var GW_TYPE_CENTER_DANGERZONE byte = 0x11

위험구역 집중 GW

View Source
var GW_TYPE_CENTER_FACTORY byte = 0x01

제조현장 집중 GW

View Source
var GW_TYPE_PORTABLE_CONSTRUCTION byte = 0x21

건설현장 이동

View Source
var GW_TYPE_RELAY_CONSTRUCTION byte = 0x22

건설현장 중계

View Source
var GW_TYPE_RELAY_FACTORY byte = 0x02

제조현장 중계 GW

View Source
var GW_TYPE_RELAY_PLATFORM byte = 0x31

지능형 플랫폼 릴레이

View Source
var GW_TYPE_SERVER_PLATFORM byte = 0x32

지능형 플랫폼 서버

View Source
var GW_TYPE_SMART_DANGERZONE byte = 0x13

위험구혁 스마트 GW

View Source
var GW_TYPE_SMART_FACTORY byte = 0x03

제조현장 스마트 GW

View Source
var NAME_BB_APPROACH_OBJECT = "event.approach"
View Source
var NAME_BB_EVENT_COLLISION = "event.collision"

블랙박스 충돌 이벤트

View Source
var NAME_BB_FRONT_APPROACH = "front.approach"

전방/후방 접근감지 파일

View Source
var NAME_BB_FRONT_COLLISION = "front.collision"

전방/후방 충돌 파일

View Source
var NAME_BB_FRONT_VIDEO = "front.video"

전방/후방 영상 파일

View Source
var NAME_BB_RADAR_APPROACH = "radar.approach"

텔레필드 레이다(RADAR)

View Source
var NAME_BB_RAW_ACCELEROMETER = "accelerometer.raw"

RAW 가속도 데이터 파일

View Source
var NAME_BB_REAR_APPROACH = "rear.approach"
View Source
var NAME_BB_REAR_COLLISION = "rear.collision"
View Source
var NAME_BB_REAR_VIDEO = "rear.video"
View Source
var NAME_BB_UWB_LOCATION = "event.location"
View Source
var NAME_BB_WORKER_IDENTITY = "worker.identify"

에이브레인 작업자 식별

View Source
var NAME_CGW_COLLISION_RISK = "event.collision.risk"
View Source
var NAME_CODE_ABRAIN = "ABRAIN"
View Source
var NAME_CODE_ELSSEN = "ELSSEN"
View Source
var NAME_CODE_TELEFIELD = "TELEFIELD"
View Source
var NAME_CODE_WRAPPED = "Wrapped"
View Source
var NAME_CODE_YMTECH = "YMTECH"
View Source
var NAME_GW_CENTER_STATUS_DANGERZONE = "center.gw.status"

위험구역

View Source
var NAME_GW_CENTER_STATUS_FACTORY = "center.gw.status"

제조현장

View Source
var NAME_GW_ELSSEN_SAFETY_HOOK = "safetyhook"

건설 현장 안전고리

View Source
var NAME_GW_ELSSEN_TOXIC_GAS = "toxicgas"

건설 현장 유해가스

View Source
var NAME_GW_ELSSEN_WEARABLE_DEVICE = "wearable"

건설 현장 생체

View Source
var NAME_GW_PORTABLE_STATUS_CONSTRUCTION = "portable.gw.status"

건설현장

View Source
var NAME_GW_RELAY_STATUS_CONSTRUCTION = "relay.gw.status"
View Source
var NAME_GW_RELAY_STATUS_FACTORY = "relay.gw.status"
View Source
var NAME_GW_SMART_STATUS_DANGERZONE = "smart.gw.status"
View Source
var NAME_GW_SMART_STATUS_FACTORY = "smart.gw.status"
View Source
var NAME_UNKNOWN = "unknown"
View Source
var TYPE_BB_APPROACH_OBJECT = "접근 감지 영상"
View Source
var TYPE_BB_EVENT_COLLISION = "가속도 충돌 이벤트"

블랙박스 충돌 이벤트

View Source
var TYPE_BB_FRONT_APPROACH = "전방 접근감지 이력 파일"

전방/후방 접근감지 파일

View Source
var TYPE_BB_FRONT_COLLISION = "전방 충돌 이력 파일"

전방/후방 충돌 파일

View Source
var TYPE_BB_FRONT_VIDEO = "전방 영상 파일"

전방/후방 영상 파일

View Source
var TYPE_BB_RADAR_APPROACH = "접근 감지 레이다"

텔레필드 레이다(RADAR)

View Source
var TYPE_BB_RAW_ACCELEROMETER = "RAW 6축 가속도 파일"

RAW 가속도 데이터 파일

View Source
var TYPE_BB_REAR_APPROACH = "후방 접근감지 이력 파일"
View Source
var TYPE_BB_REAR_COLLISION = "후방 충돌 이력 파일"
View Source
var TYPE_BB_REAR_VIDEO = "후방 영상 파일"
View Source
var TYPE_BB_UWB_LOCATION = "UWB 위치/속도"
View Source
var TYPE_BB_WORKER_IDENTITY = "작업자 식별"

에이브레인 작업자 식별

View Source
var TYPE_CGW_COLLISION_RISK = "충돌 위험"

집중게이트웨이: 충돌 위험

View Source
var TYPE_CODE_ABRAIN = "ABRAIN"
View Source
var TYPE_CODE_ELSSEN = "ELSSEN"
View Source
var TYPE_CODE_TELEFIELD = "TELEFIELD"
View Source
var TYPE_CODE_WRAPPED = "Wrapped"
View Source
var TYPE_CODE_YMTECH = "YMTECH"
View Source
var TYPE_GW_CENTER_STATUS_DANGERZONE = "위험구역 집중게이트웨이 상태보고"

위험구역

View Source
var TYPE_GW_CENTER_STATUS_FACTORY = "제조현장 집중게이트웨이 상태보고"

제조현장

View Source
var TYPE_GW_ELSSEN_SAFETY_HOOK = "안전고리"

건설 현장 안전고리

View Source
var TYPE_GW_ELSSEN_TOXIC_GAS = "유해가스"

건설 현장 유해가스

View Source
var TYPE_GW_ELSSEN_WEARABLE_DEVICE = "생체정보"

건설 현장 생체

View Source
var TYPE_GW_PORTABLE_STATUS_CONSTRUCTION = "건설현장 이동형게이트웨이 상태보고"

건설현장

View Source
var TYPE_GW_RELAY_STATUS_CONSTRUCTION = "건설현장 중계게이트웨이 상태보고"
View Source
var TYPE_GW_RELAY_STATUS_FACTORY = "제조현장 중계게이트웨이 상태보고"
View Source
var TYPE_GW_SMART_STATUS_DANGERZONE = "위험구역 스마트게이트웨이 상태보고"
View Source
var TYPE_GW_SMART_STATUS_FACTORY = "제조현장 스마트게이트웨이 상태보고"
View Source
var TYPE_UNKNOWN = "알 수 없음"

Functions

func AppendSliceToList

func AppendSliceToList(dst *list.List, src []interface{}) *list.List

func AppendToList

func AppendToList(dst *list.List, src ...interface{}) *list.List

func AsBool

func AsBool(value interface{}) (bool, error)

func AsByte

func AsByte(value interface{}) (byte, error)

func AsBytes

func AsBytes(value interface{}) ([]byte, error)

func AsFloat32

func AsFloat32(value interface{}) (float32, error)

func AsFloat64

func AsFloat64(value interface{}) (float64, error)

func AsInt

func AsInt(value interface{}) (int, error)

func AsInt16

func AsInt16(value interface{}) (int16, error)

func AsInt32

func AsInt32(value interface{}) (int32, error)

func AsInt64

func AsInt64(value interface{}) (int64, error)

func AsString

func AsString(value interface{}) (string, error)

func AsUint

func AsUint(value interface{}) (uint, error)

func AsUint16

func AsUint16(value interface{}) (uint16, error)

func AsUint32

func AsUint32(value interface{}) (uint32, error)

func AsUint64

func AsUint64(value interface{}) (uint64, error)

func Copy

func Copy(src, dst string) (int64, error)

func CopyMap

func CopyMap(dst Map, src Map) error

func Dial

func Dial(remote *ServiceConfigurations) (net.Conn, error)

*

  • remote 서비스에 연결을 시도한다.
  • timeout 연결 대기 시간으로 <= 0 면, timeout을 지정하지 않는다.

func EncBEString

func EncBEString(tag uint16, data string) []byte

func EncBETL

func EncBETL(tag uint16, length uint32) []byte

* BigEndian

func EncBETLV

func EncBETLV(tag uint16, data []byte) []byte

func EncBEUint16

func EncBEUint16(tag uint16, data uint16) []byte

func EncBEUint32

func EncBEUint32(tag uint16, data uint32) []byte

func EncLEString

func EncLEString(tag uint16, data string) []byte

func EncLETL

func EncLETL(tag uint16, length uint32) []byte

* LittleEndian

func EncLETLV

func EncLETLV(tag uint16, data []byte) []byte

func EncLETLnV

func EncLETLnV(tag uint16, size uint, data []byte) []byte

func EncLEUint16

func EncLEUint16(tag uint16, data uint16) []byte

func EncLEUint32

func EncLEUint32(tag uint16, data uint32) []byte

func EncTagLn

func EncTagLn(order binary.ByteOrder, tag []byte, size uint, length uint32) []byte

func EncTagLnString

func EncTagLnString(order binary.ByteOrder, tag []byte, size uint, data string) []byte

func EncTagLnUInt16

func EncTagLnUInt16(order binary.ByteOrder, tag []byte, size uint, data uint16) []byte

func EncTagLnUInt32

func EncTagLnUInt32(order binary.ByteOrder, tag []byte, size uint, data uint32) []byte

func EncTagLnUInt64

func EncTagLnUInt64(order binary.ByteOrder, tag []byte, size uint, data uint64) []byte

func EncTagLnV

func EncTagLnV(order binary.ByteOrder, tag []byte, size uint, data []byte) []byte

func EncodeMap

func EncodeMap(order binary.ByteOrder, params map[int][]byte) []byte

func GetEquipmentName

func GetEquipmentName(code byte) string

*

  • 장비 코드값에 해당하는 장비 이름

func GetFlagBoolean

func GetFlagBoolean(option *bool, name string, param *bool, deffunc func() bool)

func GetFlagInt

func GetFlagInt(option *int, name string, param *int, deffunc func() int)

func GetFlagInt32

func GetFlagInt32(option *int32, name string, param *int32, deffunc func() int32)

func GetFlagInt64

func GetFlagInt64(option *int64, name string, param *int64, deffunc func() int64)

func GetFlagString

func GetFlagString(option *string, name string, param *string, deffunc func() string)

func GetFlagUint

func GetFlagUint(option *uint, name string, param *uint, deffunc func() uint)

func GetFlagUint32

func GetFlagUint32(option *uint32, name string, param *uint32, deffunc func() uint32)

func GetFlagUint64

func GetFlagUint64(option *uint64, name string, param *uint64, deffunc func() uint64)

func GetGID

func GetGID() uint64

func GetMQTTClient

func GetMQTTClient(config *MQTTConfigurations) (MQTT.Client, error)

func GetMessageName

func GetMessageName(order binary.ByteOrder, data []byte) string

func GetMessageName4ELSSEN

func GetMessageName4ELSSEN(order binary.ByteOrder, data []byte) string

*

  • 0xEA, 0xCE

func GetMessageName4Wrap

func GetMessageName4Wrap(order binary.ByteOrder, data []byte) string

*

  • 0xEF, 0xF0 메시지

func GetMessageName4YMTECH

func GetMessageName4YMTECH(order binary.ByteOrder, data []byte) string

*

  • 0xEF, 0xFE

func GetMessageType

func GetMessageType(order binary.ByteOrder, data []byte) string

func GetMessageType4ELSSEN

func GetMessageType4ELSSEN(order binary.ByteOrder, data []byte) string

*

  • 0xEA, 0xCE

func GetMessageType4Wrap

func GetMessageType4Wrap(order binary.ByteOrder, data []byte) string

*

  • 0xEF, 0xF0 메시지

func GetMessageType4YMTECH

func GetMessageType4YMTECH(order binary.ByteOrder, data []byte) string

*

  • 0xEF, 0xFE

func GetSubID

func GetSubID(order binary.ByteOrder, data []byte) []byte

*

  • 0xEF, 0xFE

func GetSubID4ELSSEN

func GetSubID4ELSSEN(order binary.ByteOrder, data []byte) int

*

  • 0xEA, 0xCE

func GetSubID4YMTECH

func GetSubID4YMTECH(order binary.ByteOrder, data []byte) []byte

*

  • 0xEF, 0xFE

func GetTransmissionMethod

func GetTransmissionMethod(order binary.ByteOrder, data []byte) int

func GetTransmissionMethod4Wrap

func GetTransmissionMethod4Wrap(order binary.ByteOrder, data []byte) int

*

  • 0xEF, 0xF0 메시지

func GetTransmissionMethod4YMTECH

func GetTransmissionMethod4YMTECH(order binary.ByteOrder, data []byte) int

*

  • 0xEF, 0xFE

func GetType

func GetType(myvar interface{}) string

func HttpPost

func HttpPost(rawurl string, headers map[string]string, data []byte, handler func(*resty.Response)) (int, error)

HTTP를 통한 데이터 전송

func IsFlagPassed

func IsFlagPassed(name string) bool

*

  • 지정된 이름의 인자가 전달되었는지 확인한다.

func ListToSlice

func ListToSlice(src *list.List) []interface{}

func ListToStringArray

func ListToStringArray(src *list.List) []string

func MakeRecvChannel

func MakeRecvChannel(conn net.Conn, ud interface{}, callback func(net.Conn, interface{}) ([]byte, error)) (chan []byte, chan error)

*

*

func Map2SMap

func Map2SMap(dst map[string]interface{}, src map[interface{}]interface{}) error

func MapKey

func MapKey(key []byte) interface{}

func NativeEndian

func NativeEndian() binary.ByteOrder

func NewTLSConfig

func NewTLSConfig() *tls.Config

func Pack

func Pack(args ...interface{}) interface{}

func PackAsString

func PackAsString(args ...interface{}) string

func ReadFile

func ReadFile(filepath string) (*bytes.Buffer, error)

func ReadyServer

func ReadyServer(serviceConfig *ServiceConfigurations, ud interface{}, callback func(net.Conn, interface{}) error) int

func RecvTLV

func RecvTLV(conn net.Conn, order binary.ByteOrder) ([]byte, error)

func Relay

func Relay(conn1 net.Conn, ud1 interface{},
	callback1 func(net.Conn, interface{}) ([]byte, error),
	conn2 net.Conn, ud2 interface{},
	callback2 func(net.Conn, interface{}) ([]byte, error)) int

*

  • 있는 그대로 읽고 전달한다.

func ReportEvent

func ReportEvent(url string, log EventLog) error

func ReportLog

func ReportLog(url string, sourceId string, evtGwType string, evtType string, status string, message string, content string) error

func SMap2Struct

func SMap2Struct(dst interface{}, src map[string]interface{}) error

func SendMessage

func SendMessage(data []byte, conn net.Conn) (int, error)

*

  • A-brain 작업자 식별 메시지 전송

func SetField

func SetField(obj interface{}, name string, value interface{}) error

func SliceToList

func SliceToList(src []interface{}) *list.List

func StartServer

func StartServer(serviceConfig *ServiceConfigurations, ud interface{}, callback func(net.Conn, interface{}) error) net.Listener

func StringJoin

func StringJoin(elems []string, sep string, filter func(string) string) string

func SumHash

func SumHash(filepath string, hash hash.Hash) (string, error)

func SumMD5

func SumMD5(filepath string) (string, error)

func SumSHA256

func SumSHA256(filepath string) (string, error)

func TimeYYmmddHHMMSS

func TimeYYmmddHHMMSS(t *time.Time) string

func TraceTLVMessage

func TraceTLVMessage(order binary.ByteOrder, data []byte, handler func(tl32v *TL32V) int) (int, error)

Types

type ClientConfigurations

type ClientConfigurations struct {
	Remote       ServiceConfigurations
	SourceId     string
	EventLogUrl  string
	DiagInterval int64
}

func (*ClientConfigurations) PrintConfigurations

func (v *ClientConfigurations) PrintConfigurations()

*

  • ClientConfigurations을 JSON 형태로 출력한다.

func (ClientConfigurations) ToString

func (v ClientConfigurations) ToString() []string

type DataRelay

type DataRelay interface {
	DoSend(args ...interface{}) (interface{}, error)
}

type EventLog

type EventLog struct {
	GatewayType string `json:"gatewayType"`
	EventType   string `json:"eventType"`
	GatewayId   string `json:"gatewayId"`
	EventTime   string `json:"eventTime"`
	Status      string `json:"status"`
	Message     string `json:"message"`
	Content     string `json:"content"`
}

func (*EventLog) EncodeLog

func (v *EventLog) EncodeLog() ([]byte, error)

type FirmwareConfigurations

type FirmwareConfigurations struct {
	Enable           bool
	ConfigFilepath   string
	DownlaodFilepath string
	Http             HttpConfigurations
}

type GatewayConfigurations

type GatewayConfigurations struct {
	Date        string
	Model       string
	Manufacture string
	Serial      string
	Type        string
}

func (*GatewayConfigurations) PrintConfigurations

func (v *GatewayConfigurations) PrintConfigurations()

func (GatewayConfigurations) ToString

func (v GatewayConfigurations) ToString() []string

type HttpConfigurations

type HttpConfigurations struct {
	EnableTls     bool
	Authorization string
	TlsCert       string
	TlsKey        string
	Address       string
	Port          int64
	Path          string
	Timeout       int64
}

func (HttpConfigurations) ToString

func (v HttpConfigurations) ToString() []string

func (HttpConfigurations) Url

func (v HttpConfigurations) Url(args ...string) (*url.URL, error)

type MQTTConfigurations

type MQTTConfigurations struct {
	Prefix    string
	Broker    string
	Cleansess bool
	ClientId  string
	Qos       int
	User      string
	Password  string
}

func (MQTTConfigurations) ToString

func (v MQTTConfigurations) ToString() []string

type Map

type Map map[interface{}]interface{}

func NewMap

func NewMap() *Map

func (Map) AsByte

func (d Map) AsByte(key interface{}) (byte, error)

func (Map) AsFloat32

func (d Map) AsFloat32(key interface{}) (float32, error)

func (Map) AsFloat64

func (d Map) AsFloat64(key interface{}) (float64, error)

func (Map) AsInt

func (d Map) AsInt(key interface{}) (int, error)

func (Map) AsInt32

func (d Map) AsInt32(key interface{}) (int32, error)

func (Map) AsInt64

func (d Map) AsInt64(key interface{}) (int64, error)

func (Map) AsString

func (d Map) AsString(key interface{}) (string, error)

func (Map) AsUint

func (d Map) AsUint(key interface{}) (uint, error)

func (Map) AsUint32

func (d Map) AsUint32(key interface{}) (uint32, error)

func (Map) AsUint64

func (d Map) AsUint64(key interface{}) (uint64, error)

func (Map) Get

func (d Map) Get(key interface{}) interface{}

func (Map) GetKeys

func (m Map) GetKeys() []interface{}

func (Map) GetValues

func (m Map) GetValues() []interface{}

func (Map) Has

func (d Map) Has(key interface{}) bool

func (Map) Len

func (m Map) Len() int

func (Map) Range

func (m Map) Range(cb func(key interface{}, value interface{}) bool)

func (Map) Remove

func (m Map) Remove(key interface{}) (interface{}, bool)

func (Map) RemoveAll

func (m Map) RemoveAll()

func (Map) Set

func (d Map) Set(key interface{}, value interface{})

func (Map) SetPair

func (d Map) SetPair(pair ...Pair)

func (Map) ToArray

func (m Map) ToArray() []Pair

type Pair

type Pair struct {
	Key   interface{}
	Value interface{}
}

type PublishConfigurations

type PublishConfigurations struct {
	Service      ServiceConfigurations
	Remote       ServiceConfigurations
	MQTT         MQTTConfigurations
	SourceId     string
	EventLogUrl  string
	DiagInterval int64
}

func (*PublishConfigurations) PrintConfigurations

func (v *PublishConfigurations) PrintConfigurations()

*

  • PublishConfigurations JSON 형태로 출력한다.

func (PublishConfigurations) ToString

func (v PublishConfigurations) ToString() []string

type RelayConfigurations

type RelayConfigurations struct {
	Service      ServiceConfigurations
	Remote       ServiceConfigurations
	SourceId     string
	EventLogUrl  string
	DiagInterval int64
}

func (*RelayConfigurations) PrintConfigurations

func (v *RelayConfigurations) PrintConfigurations()

*

  • RelayConfigurations JSON 형태로 출력한다.

func (RelayConfigurations) ToString

func (v RelayConfigurations) ToString() []string

type SMap

type SMap map[string]interface{}

func NewSMap

func NewSMap() SMap

func (SMap) AsByte

func (d SMap) AsByte(key string) (byte, error)

func (SMap) AsFloat32

func (d SMap) AsFloat32(key string) (float32, error)

func (SMap) AsFloat64

func (d SMap) AsFloat64(key string) (float64, error)

func (SMap) AsInt

func (d SMap) AsInt(key string) (int, error)

func (SMap) AsInt32

func (d SMap) AsInt32(key string) (int32, error)

func (SMap) AsInt64

func (d SMap) AsInt64(key string) (int64, error)

func (SMap) AsString

func (d SMap) AsString(key string) (string, error)

func (SMap) AsUint

func (d SMap) AsUint(key string) (uint, error)

func (SMap) AsUint32

func (d SMap) AsUint32(key string) (uint32, error)

func (SMap) AsUint64

func (d SMap) AsUint64(key string) (uint64, error)

func (SMap) Get

func (d SMap) Get(key string) interface{}

func (SMap) GetKeys

func (m SMap) GetKeys() []string

func (SMap) GetValues

func (m SMap) GetValues() []interface{}

func (SMap) Has

func (d SMap) Has(key string) bool

func (SMap) Len

func (m SMap) Len() int

func (SMap) Range

func (m SMap) Range(cb func(key interface{}, value interface{}) bool)

func (SMap) Remove

func (m SMap) Remove(key string) (interface{}, bool)

func (SMap) RemoveAll

func (m SMap) RemoveAll()

func (SMap) Set

func (d SMap) Set(key string, value interface{})

func (SMap) SetPair

func (d SMap) SetPair(pair ...SPair)

func (SMap) ToArray

func (m SMap) ToArray() []SPair

type SPair

type SPair struct {
	Key   string
	Value interface{}
}

type ServerConfigurations

type ServerConfigurations struct {
	Service      ServiceConfigurations
	SourceId     string
	EventLogUrl  string
	DiagInterval int64
}

func (*ServerConfigurations) PrintConfigurations

func (v *ServerConfigurations) PrintConfigurations()

*

  • ServerConfigurations을 JSON 형태로 출력한다.

func (ServerConfigurations) ToString

func (v ServerConfigurations) ToString() []string

type ServiceConfigurations

type ServiceConfigurations struct {
	EnableTls bool
	TlsCert   string
	TlsKey    string
	Address   string
	Port      int64
	Timeout   int64
}

func (*ServiceConfigurations) PrintConfigurations

func (v *ServiceConfigurations) PrintConfigurations()

*

  • RelayConfigurations JSON 형태로 출력한다.

func (ServiceConfigurations) ToString

func (v ServiceConfigurations) ToString() []string

func (ServiceConfigurations) Url

func (v ServiceConfigurations) Url(args ...string) (*url.URL, error)

type SubscribeConfigurations

type SubscribeConfigurations struct {
	Remote       ServiceConfigurations
	MQTT         MQTTConfigurations
	SourceId     string
	EventLogUrl  string
	DiagInterval int64
}

func (*SubscribeConfigurations) PrintConfigurations

func (v *SubscribeConfigurations) PrintConfigurations()

*

  • SubscribeConfigurations을 JSON 형태로 출력한다.

func (SubscribeConfigurations) ToString

func (v SubscribeConfigurations) ToString() []string

type TL16V

type TL16V struct {
	Type   []byte
	Length uint16
	Value  []byte
}

func DecTL16V

func DecTL16V(order binary.ByteOrder, data []byte) (*TL16V, error)

type TL32V

type TL32V struct {
	Type   []byte
	Length uint32
	Value  []byte
}

func DecTL32V

func DecTL32V(order binary.ByteOrder, data []byte) (*TL32V, error)

func RecvTL32V

func RecvTL32V(conn net.Conn, order binary.ByteOrder) (*TL32V, error)

func (TL32V) Bytes

func (v TL32V) Bytes(order binary.ByteOrder) []byte

func (TL32V) Size

func (v TL32V) Size() int

type TL64V

type TL64V struct {
	Type   []byte
	Length uint64
	Value  []byte
}

func DecTL64V

func DecTL64V(order binary.ByteOrder, data []byte) (*TL64V, error)

type TcpRelay

type TcpRelay struct {
	ServiceConfigurations
}

func (TcpRelay) DoSend

func (v TcpRelay) DoSend(args ...interface{}) (interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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