noderouters

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNodeToRead

func AddNodeToRead(c *gin.Context)

AddNodeToRead 路由 ------------------------------------------------------- @Summary AddNodeToRead 路由 步骤**1** @Description AddNodeToRead 路由 @Tags opc-nodes @Security BearerAuth @Accept json @Produce json @Param data body AddNodeToReadRequest true "见下方JSON" @Success 200 {object} AddNodeToReadResponse "节点添加成功" @Router /api/v1/opc-node/add-node-to-read [post]

func DeleteNode

func DeleteNode(c *gin.Context)

DeleteNode 路由 ------------------------------------------------------- @Summary DeleteNode 路由 @Description DeleteNode 路由 @Tags opc-nodes @Security BearerAuth @Accept json @Produce json @Param id path string true "节点ID" @Success 200 {object} DeleteNodeResponse "节点删除成功" @Router /api/v1/opc-node/delete-node/{id} [delete]

func GetNode

func GetNode(c *gin.Context)

GetNode 路由 ------------------------------------------------------- @Summary GetNode 路由 @Description GetNode 路由 @Tags opc-nodes @Security BearerAuth @Accept json @Produce json @Param id path string true "节点ID" @Success 200 {object} GetNodeResponse "节点信息" @Router /api/v1/opc-node/get-node/{id} [get]

func RegisterRoutes

func RegisterRoutes(router *gin.RouterGroup)

func ServiceDeleteNode

func ServiceDeleteNode(nodeID int64)

Types

type AddNodeToReadRequest

type AddNodeToReadRequest struct {
	Name     string  `json:"name" form:"name" binding:"required" example:"MyVariable"`
	NodeID   string  `json:"node_id" form:"node_id" binding:"required" example:"ns=2;i=2"`
	DataType *string `json:"data_type" form:"data_type" example:"Int32"`
}

type AddNodeToReadResponse

type AddNodeToReadResponse struct {
	Code    int           `json:"code" example:"200"`
	Data    OpcNodeOutput `json:"data" `
	Message string        `json:"message" example:"节点添加成功"`
}

type DeleteNodeResponse

type DeleteNodeResponse struct {
	Code    int    `json:"code" example:"200"`
	Data    string `json:"data" `
	Message string `json:"message" example:"节点删除成功"`
}

type GetNodeResponse

type GetNodeResponse struct {
	Code    int                   `json:"code" example:"200"`
	Data    OpcNodeWithDataOutput `json:"data" `
	Message string                `json:"message" example:"节点信息"`
}

type OpcNodeOutput

type OpcNodeOutput struct {
	Name     string `json:"name" example:"MyVariable"`
	NodeID   string `json:"node_id" example:"ns=2;s=MyVariable"`
	DataType string `json:"data_type" example:"Int32"`
}

type OpcNodeWithDataOutput

type OpcNodeWithDataOutput struct {
	OpcNodeOutput
	Value string `json:"value" example:"123"`
}

Jump to

Keyboard shortcuts

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