mtconnectParser

package
v0.0.0-...-c3a5f94 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

getXMLsendMQTT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartMqttClient

func StartMqttClient(cfg environment.Config)

Start MQTT Client and Start Parsing MTConnect

Types

type CollectedCNCData

type CollectedCNCData struct {
	Name           string
	ControllerMode string
	Program        string
	ProgramComment string
	Execution      string
	LoadS1         int
	PartCount      string
	Time           time.Time
}

MQTT message structure

type DeviceStreamStruct

type DeviceStreamStruct struct {
	Name    string          `xml:"name,attr"`
	Events  []EventsStruct  `xml:"ComponentStream>Events"`
	Samples []SamplesStruct `xml:"ComponentStream>Samples"`
}

type EventsStruct

type EventsStruct struct {
	ControllerMode string `xml:"ControllerMode"`
	Program        string `xml:"Program"`
	Execution      string `xml:"Execution"`
	ProgramComment string `xml:"ProgramComment"`
	PartCount      string `xml:"PartCount"`
}

type LoadStruct

type LoadStruct struct {
	LoadNameAttr string `xml:"name,attr"`
	Value        string `xml:",chardata"`
}

type Response

type Response struct {
	Header       []XMLHeaderStruct    `xml:"Header"`
	DeviceStream []DeviceStreamStruct `xml:"Streams>DeviceStream"`
}

MTConnect XML Structure

type SamplesStruct

type SamplesStruct struct {
	Load []LoadStruct `xml:"Load"`
}

type XMLHeaderStruct

type XMLHeaderStruct struct {
	LastSequence int64 `xml:"lastSequence,attr"`
}

Jump to

Keyboard shortcuts

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