source

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

README

外部双向、单向资源

主要用来和外部资源对接,比如Mqtt等。具备双向通信的功能。

Documentation

Index

Constants

This section is empty.

Variables

Functions

func LoadSt

func LoadSt()

func NewCoAPInEndSource

func NewCoAPInEndSource(e typex.RuleX) typex.XSource

func NewGenericMqttSource added in v0.6.6

func NewGenericMqttSource(e typex.RuleX) typex.XSource

func NewGrpcInEndSource

func NewGrpcInEndSource(e typex.RuleX) typex.XSource

func NewHttpInEndSource

func NewHttpInEndSource(e typex.RuleX) typex.XSource

func NewInternalEventSource added in v0.6.5

func NewInternalEventSource(r typex.RuleX) typex.XSource

func NewIoTHubSource added in v0.5.2

func NewIoTHubSource(e typex.RuleX) typex.XSource

func NewMqttInEndSource

func NewMqttInEndSource(e typex.RuleX) typex.XSource

func NewNatsSource

func NewNatsSource(e typex.RuleX) typex.XSource

func NewUdpInEndSource

func NewUdpInEndSource(e typex.RuleX) typex.XSource

Types

type InternalEventSource added in v0.6.5

type InternalEventSource struct {
	typex.XStatus
	// contains filtered or unexported fields
}

func (*InternalEventSource) DataModels added in v0.6.5

func (u *InternalEventSource) DataModels() []typex.XDataModel

func (*InternalEventSource) Details added in v0.6.5

func (u *InternalEventSource) Details() *typex.InEnd

func (*InternalEventSource) DownStream added in v0.6.5

func (*InternalEventSource) DownStream([]byte) (int, error)

来自外面的数据

func (*InternalEventSource) Driver added in v0.6.5

func (*InternalEventSource) Init added in v0.6.5

func (u *InternalEventSource) Init(inEndId string, configMap map[string]interface{}) error

func (*InternalEventSource) Start added in v0.6.5

func (u *InternalEventSource) Start(cctx typex.CCTX) error

func (*InternalEventSource) Status added in v0.6.5

func (*InternalEventSource) Stop added in v0.6.5

func (u *InternalEventSource) Stop()

func (*InternalEventSource) Test added in v0.6.5

func (u *InternalEventSource) Test(inEndId string) bool

func (*InternalEventSource) Topology added in v0.6.5

func (*InternalEventSource) Topology() []typex.TopologyPoint

拓扑

func (*InternalEventSource) UpStream added in v0.6.5

func (*InternalEventSource) UpStream([]byte) (int, error)

上行数据

type IotHUBTopologyDevice added in v0.5.2

type IotHUBTopologyDevice struct {
	ProductID  string `json:"productID"`
	DeviceName string `json:"deviceName"`
}

* * 下发拓扑结构 *

{
	"method":"describesubDevices",
	"clientToken":"3160be0b-6d4f-e6fa-d614-8fb422c0d16c",
	"timestamp":1681625336600,
	"status":"成功",
	"payload":{
		"devices":[
			{
				"productID":"268dGhSTdOE",
				"deviceName":"RULEX-大屏1"
			}
		]
	}
}

func (IotHUBTopologyDevice) OfflineTopic added in v0.5.2

func (tt IotHUBTopologyDevice) OfflineTopic() string

$thing/status/${productid}/${devicename}

func (IotHUBTopologyDevice) OnlineTopic added in v0.5.2

func (tt IotHUBTopologyDevice) OnlineTopic() string

$thing/status/${productid}/${devicename}

func (IotHUBTopologyDevice) ReportTopic added in v0.5.2

func (tt IotHUBTopologyDevice) ReportTopic() string

$thing/up/property/{ProductID}/{DeviceName}

type IotHUBTopologyDownMsg added in v0.5.2

type IotHUBTopologyDownMsg struct {
	Method      string          `json:"method"`
	ClientToken string          `json:"clientToken"`
	Timestamp   int64           `json:"timestamp"`
	Status      string          `json:"status"`
	Payload     TopologyPayload `json:"payload"`
}

type IotHUBTopologyPayload added in v0.5.2

type IotHUBTopologyPayload struct {
	Devices []IotHUBTopologyDevice `json:"devices"`
}

type MqttMessage added in v0.6.6

type MqttMessage struct {
	Topic   string `json:"topic"`
	Payload []byte `json:"payload"`
}

type RulexRpcServer

type RulexRpcServer struct {
	rulexrpc.UnimplementedRulexRpcServer
	// contains filtered or unexported fields
}

func (*RulexRpcServer) Work

type TopologyDevice

type TopologyDevice struct {
	ProductID  string `json:"productID"`
	DeviceName string `json:"deviceName"`
}

* * 下发拓扑结构 *

{
	"method":"describesubDevices",
	"clientToken":"3160be0b-6d4f-e6fa-d614-8fb422c0d16c",
	"timestamp":1681625336600,
	"status":"成功",
	"payload":{
		"devices":[
			{
				"productID":"268dGhSTdOE",
				"deviceName":"RULEX-大屏1"
			}
		]
	}
}

func (TopologyDevice) OfflineTopic

func (tt TopologyDevice) OfflineTopic() string

$thing/status/${productid}/${devicename}

func (TopologyDevice) OnlineTopic

func (tt TopologyDevice) OnlineTopic() string

$thing/status/${productid}/${devicename}

func (TopologyDevice) ReportTopic

func (tt TopologyDevice) ReportTopic() string

$thing/up/property/{ProductID}/{DeviceName}

type TopologyDownMsg

type TopologyDownMsg struct {
	Method      string          `json:"method"`
	ClientToken string          `json:"clientToken"`
	Timestamp   int64           `json:"timestamp"`
	Status      string          `json:"status"`
	Payload     TopologyPayload `json:"payload"`
}

type TopologyPayload

type TopologyPayload struct {
	Devices []TopologyDevice `json:"devices"`
}

Jump to

Keyboard shortcuts

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