XMLTypes

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseList

func ParseList[Source ConvertToDestinationStruct[Destination], Destination any](source *[]Source) []*Destination

func ParseMap

func ParseMap[Source ConvertToDestinationMapStruct[Destination], Destination any](source *[]Source) map[string]*Destination

Types

type ActivationGroup

type ActivationGroup struct {
	Name string `xml:",attr"`
}

func (ActivationGroup) Parse

func (attr ActivationGroup) Parse() Types.ActivationGroup

func (ActivationGroup) ParseKey

func (attr ActivationGroup) ParseKey() string

type AnimationSystem

type AnimationSystem struct {
	P1      []float32 `xml:",attr"`
	P2      []float32 `xml:",attr"`
	P3      []float32 `xml:",attr"`
	Radiues float32   `xml:",attr"`
}

func (AnimationSystem) Parse

func (attr AnimationSystem) Parse() Types.AnimationSystem

type ArtNet

type ArtNet struct {
	Maps []Map `xml:"Map"`
}

key: artnet value, value: dmx value

func (ArtNet) Parse

func (protcol ArtNet) Parse() Types.ArtNet

type Attribute

type Attribute struct {
	Name             string            `xml:",attr"`
	Pretty           string            `xml:",attr"`
	ActivationGroup  XMLNodeReference  `xml:",attr"` // ActivationGroup
	Feature          XMLNodeReference  `xml:",attr"` // Feature
	MainAttribute    XMLNodeReference  `xml:",attr"` // Attribute
	PhysicalUnit     string            `xml:",attr"`
	Color            ColorCIE          `xml:",attr"`
	SubPhysicalUnits []SubPhysicalUnit `xml:"SubPhysicalUnits"`
}

func (Attribute) Parse

func (attr Attribute) Parse() Types.Attribute

func (Attribute) ParseKey

func (attr Attribute) ParseKey() string

type AttributeDefinitions

type AttributeDefinitions struct {
	ActivationGroups []ActivationGroup `xml:"ActivationGroups>ActivationGroup"`
	FeatureGroups    []FeatureGroup    `xml:"FeatureGroups>FeatureGroup"`
	Attributes       []Attribute       `xml:"Attributes>Attribute"`
}

func (AttributeDefinitions) Parse

type Axis

type Axis struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (Axis) Parse

func (geometry Axis) Parse() Types.Axis

type Beam

type Beam struct {
	Name             string           `xml:",attr"`
	Model            string           `xml:",attr"`
	Position         Matrix           `xml:",attr"`
	LampType         string           `xml:",attr"`
	PowerConsumption float32          `xml:",attr"`
	LuminousFlux     float32          `xml:",attr"`
	ColorTemperature float32          `xml:",attr"`
	BeamAngle        float32          `xml:",attr"`
	FieldAngle       float32          `xml:",attr"`
	ThrowRatio       float32          `xml:",attr"`
	RectangleRatio   float32          `xml:",attr"`
	BeamRadius       float32          `xml:",attr"`
	BeamType         string           `xml:",attr"`
	CRI              uint             `xml:"ColorRenderingIndex,attr"`
	EmitterSpectrum  XMLNodeReference `xml:",attr"`
	Geometries
}

func (Beam) Parse

func (geometry Beam) Parse() Types.Beam

type Break

type Break struct {
	DMXOffset DMXAddress `xml:",attr"`
	DMXBreak  uint       `xml:",attr"`
}

func (Break) Parse

func (geometry Break) Parse() Types.Break

type CITP

type CITP struct {
}

type CRI

type CRI struct {
	CES string `xml:",attr"`
	CRI uint   `xml:",attr"`
}

func (CRI) Parse

func (object CRI) Parse() Types.CRI

type CRIGroup

type CRIGroup struct {
	ColorTemperature float32 `xml:",attr"`
	CRIs             *[]CRI  `xml:"CRI"`
}

func (CRIGroup) Parse

func (object CRIGroup) Parse() Types.CRIGroup

type ChannelFunction

type ChannelFunction struct {
	Name              string           `xml:",attr"`
	Attribute         XMLNodeReference `xml:",attr"`
	OriginalAttribute string           `xml:",attr"`
	DMXFrom           XMLDMXValue      `xml:",attr"`
	Default           XMLDMXValue      `xml:",attr"`
	PhysicalFrom      float32          `xml:",attr"`
	PhysicalTo        float32          `xml:",attr"`
	RealFade          float32          `xml:",attr"`
	RealAcceleration  float32          `xml:",attr"`
	Wheel             XMLNodeReference `xml:",attr"`
	Emitter           XMLNodeReference `xml:",attr"`
	Filter            XMLNodeReference `xml:",attr"`
	ColorSpace        XMLNodeReference `xml:",attr"`
	Gamut             XMLNodeReference `xml:",attr"`
	ModeMaster        XMLNodeReference `xml:",attr"`
	ModeFrom          XMLDMXValue      `xml:",attr"`
	ModeTo            XMLDMXValue      `xml:",attr"`
	DMXProfile        XMLNodeReference `xml:",attr"`
	Min               float32          `xml:",attr"` // Fallback to PhysicalFrom if 0.0
	Max               float32          `xml:",attr"` // Fallback to PhysicalTo if 0.0
	CustomName        string           `xml:",attr"` // Default: Node Name of the Channel function Example: Head_Dimmer.Dimmer.Dimmer
	ChannelSets       []ChannelSet     `xml:"ChannelSet"`
	SubChannelSets    []SubChannelSet  `xml:"SubChannelSet"`
}

func (ChannelFunction) Parse

type ChannelSet

type ChannelSet struct {
	Name           string      `xml:",attr"`
	DMXFrom        XMLDMXValue `xml:",attr"`
	PhysicalFrom   float32     `xml:",attr"`
	PhysicalTo     float32     `xml:",attr"`
	WheelSlotIndex int         `xml:",attr"`
}

func (ChannelSet) Parse

func (dmx ChannelSet) Parse() Types.ChannelSet

type ColorCIE

type ColorCIE struct {
	X  float32
	Y  float32
	Y2 float32
}

format xyY (X,Y,Y2)

func (ColorCIE) Parse

func (object ColorCIE) Parse() Types.ColorCIE

func (*ColorCIE) UnmarshalXMLAttr

func (dest *ColorCIE) UnmarshalXMLAttr(attr xml.Attr) error

type ColorSpace

type ColorSpace struct {
	Name       string   `xml:",attr"`
	Mode       string   `xml:",attr"` //enum + TODO: default data (see https://www.gdtf.eu/gdtf/file-spec/physical-descriptions/#table-20-color-space-attributes)
	Red        ColorCIE `xml:",attr"`
	Green      ColorCIE `xml:",attr"`
	Blue       ColorCIE `xml:",attr"`
	WhitePoint ColorCIE `xml:",attr"`
}

func (ColorSpace) Parse

func (object ColorSpace) Parse() Types.ColorSpace

type Connector

type Connector struct {
	Name     string  `xml:",attr"`
	Type     string  `xml:",attr"`
	DMXBreak uint    `xml:",attr"` // obsolete (see https://www.gdtf.eu/gdtf/file-spec/physical-descriptions/#table-27-connector-attributes)
	Gender   int     `xml:",attr"` // obsolete
	Length   float32 `xml:",attr"` // obsolete
}

func (Connector) Parse

func (object Connector) Parse() Types.Connector

type ConvertToDestinationMapStruct

type ConvertToDestinationMapStruct[T any] interface {
	ConvertToDestinationStruct[T]
	ParseKey() string
}

type ConvertToDestinationStruct

type ConvertToDestinationStruct[T any] interface {
	Parse() T
}

type DMXAddress

type DMXAddress struct {
	Address  int16 // 0 indexed
	Universe int   // 0 indexed
}

DMX Address, NOTE: values are 0 indexed (e.g. Universe 0 being 1 in real life)

func (*DMXAddress) UnmarshalXMLAttr

func (b *DMXAddress) UnmarshalXMLAttr(attr xml.Attr) error

type DMXChannel

type DMXChannel struct {
	DMXBreak        int              `xml:",attr"`
	Offset          IntList          `xml:",attr"`
	InitialFunction XMLNodeReference `xml:",attr"`
	Highlight       XMLDMXValue      `xml:",attr"`
	Geometry        XMLNodeReference `xml:",attr"`
	LogicalChannels []LogicalChannel `xml:"LogicalChannel"`
}

func (DMXChannel) Parse

func (dmx DMXChannel) Parse() Types.DMXChannel

type DMXMode

type DMXMode struct {
	Name        string           `xml:",attr"`
	Description string           `xml:",attr"`
	Geometry    XMLNodeReference `xml:",attr"`
	DMXChannels []DMXChannel     `xml:"DMXChannels>DMXChannel"`
	Relations   []Relation       `xml:"Relations>Relation"`
	FTMacros    []FTMacro        `xml:"FTMacros>FTMacro"`
}

func (DMXMode) Parse

func (dmxMode DMXMode) Parse() Types.DMXMode

func (DMXMode) ParseKey

func (dmxMode DMXMode) ParseKey() string

type DMXProfile

type DMXProfile struct {
	Name   string  `xml:",attr"`
	Points []Point `xml:"Point"`
}

func (DMXProfile) Parse

func (object DMXProfile) Parse() Types.DMXProfile

type Display

type Display struct {
	Name     string        `xml:",attr"`
	Model    string        `xml:",attr"`
	Position Matrix        `xml:",attr"`
	Texture  FileReference `xml:",attr"`
	Geometries
}

func (Display) Parse

func (geometry Display) Parse() Types.Display

type Emitter

type Emitter struct {
	Name               string        `xml:",attr"`
	Color              ColorCIE      `xml:",attr"`
	DominantWaveLength float32       `xml:",attr"`
	DiodePart          string        `xml:",attr"`
	Measurements       []Measurement `xml:"Measurement"`
}

func (Emitter) Parse

func (object Emitter) Parse() Types.Emitter

type FTMacro

type FTMacro struct {
	Name            string            `xml:",attr"`
	ChannelFunction *XMLNodeReference `xml:",attr"`
	MacroDMXs       []MacroDMX        `xml:"MacroDMX"`
}

func (FTMacro) Parse

func (dmx FTMacro) Parse() Types.FTMacro

type Feature

type Feature struct {
	Name string `xml:",attr"`
}

func (Feature) Parse

func (attr Feature) Parse() Types.Feature

func (Feature) ParseKey

func (attr Feature) ParseKey() string

type FeatureGroup

type FeatureGroup struct {
	Name     string    `xml:",attr"`
	Pretty   string    `xml:",attr"`
	Features []Feature `xml:"Feature"`
}

func (FeatureGroup) Parse

func (attr FeatureGroup) Parse() Types.FeatureGroup

func (FeatureGroup) ParseKey

func (attr FeatureGroup) ParseKey() string

type FileReference

type FileReference = string // without extension and without path

type Filter

type Filter struct {
	Name         string        `xml:",attr"`
	Color        ColorCIE      `xml:",attr"`
	Measurements []Measurement `xml:"Measurement"`
}

func (Filter) Parse

func (object Filter) Parse() Types.Filter

type FilterBeam

type FilterBeam struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (FilterBeam) Parse

func (geometry FilterBeam) Parse() Types.FilterBeam

type FilterColor

type FilterColor struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (FilterColor) Parse

func (geometry FilterColor) Parse() Types.FilterColor

type FilterGobo

type FilterGobo struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (FilterGobo) Parse

func (geometry FilterGobo) Parse() Types.FilterGobo

type FilterShaper

type FilterShaper struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (FilterShaper) Parse

func (geometry FilterShaper) Parse() Types.FilterShaper

type FixtureType

type FixtureType struct {
	FixtureTypeID    string    `xml:",attr"`
	Name             string    `xml:",attr"`
	ShortName        string    `xml:",attr"`
	LongName         string    `xml:",attr"`
	Manufacturer     string    `xml:",attr"`
	Description      string    `xml:",attr"`
	Thumbnail        string    `xml:",attr"`
	ThumbnailOffsetX int       `xml:",attr"`
	ThumbnailOffsetY int       `xml:",attr"`
	CanHaveChildren  YesNoBool `xml:",attr"`
	RefFT            *string   `xml:",attr"`

	AttributeDefinitions AttributeDefinitions  `xml:"AttributeDefinitions"`
	Wheels               []Wheel               `xml:"Wheels>Wheel"`
	PhysicalDescriptions []PhysicalDescription `xml:"PhysicalDescriptions"`
	Models               []Model               `xml:"Models>Model"`
	Geometries           Geometries            `xml:"Geometries"`
	DMXModes             []DMXMode             `xml:"DMXModes>DMXMode"`
	Revisions            []Revision            `xml:"Revisions>Revision"`
	FTPresets            []string              `xml:"FTPresets"`
	Protocols            Protocol              `xml:"Protocols"`
}

func (FixtureType) Parse

func (fixtureType FixtureType) Parse() Types.FixtureType

type GDTF

type GDTF struct {
	DataVersion string `xml:",attr"`
	FixtureType FixtureType
}

func (GDTF) Parse

func (gdtf GDTF) Parse() Types.GDTF

type Gamut

type Gamut struct {
	Name   string     `xml:",attr"`
	Points []ColorCIE `xml:",attr"`
}

func (Gamut) Parse

func (object Gamut) Parse() Types.Gamut

type Geometries

type Geometries struct {
	GeometryList          []Geometry          `xml:"Geometry"`
	AxisList              []Axis              `xml:"Axis"`
	FilterBeamList        []FilterBeam        `xml:"FilterBeam"`
	FilterColorList       []FilterColor       `xml:"FilterColor"`
	FilterGoboList        []FilterGobo        `xml:"FilterGobo"`
	FilterShaperList      []FilterShaper      `xml:"FilterShaper"`
	BeamList              []Beam              `xml:"Beam"`
	MediaServerLayerList  []MediaServerLayer  `xml:"MediaServerLayer"`
	MediaServerCameraList []MediaServerCamera `xml:"MediaServerCamera"`
	MediaServerMasterList []MediaServerMaster `xml:"MediaServerMaster"`
	DisplayList           []Display           `xml:"Display"`
	LaserList             []Laser             `xml:"Laser"`
	GeometryReferenceList []GeometryReference `xml:"GeometryReference"`
	WiringObjectList      []WiringObject      `xml:"WiringObject"`
	InventoryList         []Inventory         `xml:"Inventory"`
	StructureList         []Structure         `xml:"Structure"`
	SupportList           []Support           `xml:"Support"`
	MagnetList            []Magnet            `xml:"Magnet"`
}

func (Geometries) Parse

func (geometries Geometries) Parse() Types.Geometries

type Geometry

type Geometry struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (Geometry) Parse

func (geometry Geometry) Parse() Types.Geometry

type GeometryReference

type GeometryReference struct {
	Name        string  `xml:",attr"`
	Model       string  `xml:",attr"`
	Position    Matrix  `xml:",attr"`
	GeometryRef string  `xml:"Geometry,attr"` // only top level geometries allowed to be referenced
	Breaks      []Break `xml:"Break"`
}

func (GeometryReference) Parse

func (geometry GeometryReference) Parse() Types.GeometryReference

type Hex

type Hex int

func (*Hex) UnmarshalXMLAttr

func (h *Hex) UnmarshalXMLAttr(attr xml.Attr) error

type IntList

type IntList []int

func (*IntList) UnmarshalXMLAttr

func (h *IntList) UnmarshalXMLAttr(attr xml.Attr) error

type Inventory

type Inventory struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Count    int    `xml:",attr"`
	Geometries
}

func (Inventory) Parse

func (geometry Inventory) Parse() Types.Inventory

type Laser

type Laser struct {
	Name              string           `xml:",attr"`
	Model             string           `xml:",attr"`
	Position          Matrix           `xml:",attr"`
	ColorType         string           `xml:",attr"` // enum
	Color             float32          `xml:",attr"` // Required if ColorType is “SingleWaveLength”; Unit:nm (nanometers)
	OutputStrength    float32          `xml:",attr"`
	Emitter           XMLNodeReference `xml:",attr"`
	BeamDiameter      float32          `xml:",attr"`
	BeamDivergenceMin float32          `xml:",attr"`
	BeamDivergenceMax float32          `xml:",attr"`
	ScanAnglePan      float32          `xml:",attr"`
	ScanAngleTilt     float32          `xml:",attr"`
	ScanSpeed         float32          `xml:",attr"`
	Protocols         []LaserProtocol  `xml:"Protocol"`
	Geometries
}

func (Laser) Parse

func (geometry Laser) Parse() Types.Laser

type LaserProtocol

type LaserProtocol struct {
	Name string `xml:",attr"`
}

func (LaserProtocol) Parse

func (protocol LaserProtocol) Parse() Types.LaserProtocol

type LegHeight

type LegHeight struct {
	Value float32 `xml:",attr"`
}

type LogicalChannel

type LogicalChannel struct {
	Attribute          XMLNodeReference  `xml:",attr"`
	Snap               string            `xml:",attr"` // enum
	Master             string            `xml:",attr"` // enum
	MibFade            float32           `xml:",attr"`
	DMXChangeTimeLimit float32           `xml:",attr"`
	ChannelFunctions   []ChannelFunction `xml:"ChannelFunction"`
}

func (LogicalChannel) Parse

func (dmx LogicalChannel) Parse() Types.LogicalChannel

type MacroDMX

type MacroDMX struct {
	Steps []MacroDMXStep `xml:"MacroDMXStep"`
}

func (MacroDMX) Parse

func (dmx MacroDMX) Parse() Types.MacroDMX

type MacroDMXStep

type MacroDMXStep struct {
	Duration  float32         `xml:",attr"`
	DMXValues []MacroDMXValue `xml:"DMXValue"`
}

func (MacroDMXStep) Parse

func (dmx MacroDMXStep) Parse() Types.MacroDMXStep

type MacroDMXValue

type MacroDMXValue struct {
	Value      XMLDMXValue      `xml:",attr"`
	DMXChannel XMLNodeReference `xml:",attr"`
}

func (MacroDMXValue) Parse

func (dmx MacroDMXValue) Parse() Types.MacroDMXValue

type Magnet

type Magnet struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (Magnet) Parse

func (geometry Magnet) Parse() Types.Magnet

type Map

type Map struct {
	Key   uint `xml:",attr"` // Art-Net value
	Value uint `xml:",attr"` // DMX value
}

func (Map) Parse

func (object Map) Parse() Types.Map

type Matrix

type Matrix [4][4]float64

func (*Matrix) UnmarshalXMLAttr

func (dest *Matrix) UnmarshalXMLAttr(attr xml.Attr) error

type Measurement

type Measurement struct {
	Physical          float32             `xml:",attr"`
	LuminousIntensity float32             `xml:",attr"`
	Transmission      float32             `xml:",attr"`
	InterpolationTo   string              `xml:",attr"`
	MeasurementPoints *[]MeasurementPoint `xml:"MeasurementPoint"`
}

func (Measurement) Parse

func (object Measurement) Parse() Types.Measurement

type MeasurementPoint

type MeasurementPoint struct {
	WaveLength float32 `xml:",attr"`
	Energy     float32 `xml:",attr"`
}

func (MeasurementPoint) Parse

func (object MeasurementPoint) Parse() Types.MeasurementPoint

type MediaServerCamera

type MediaServerCamera struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (MediaServerCamera) Parse

func (geometry MediaServerCamera) Parse() Types.MediaServerCamera

type MediaServerLayer

type MediaServerLayer struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (MediaServerLayer) Parse

func (geometry MediaServerLayer) Parse() Types.MediaServerLayer

type MediaServerMaster

type MediaServerMaster struct {
	Name     string `xml:",attr"`
	Model    string `xml:",attr"`
	Position Matrix `xml:",attr"`
	Geometries
}

func (MediaServerMaster) Parse

func (geometry MediaServerMaster) Parse() Types.MediaServerMaster

type Model

type Model struct {
	Name            string  `xml:",attr"`
	Length          float32 `xml:",attr"`
	Width           float32 `xml:",attr"`
	Height          float32 `xml:",attr"`
	PrimitiveType   string  `xml:",attr"` // enum
	File            *string `xml:",attr"`
	SVGOffsetX      float32 `xml:",attr"`
	SVGOffsetY      float32 `xml:",attr"`
	SVGSideOffsetX  float32 `xml:",attr"`
	SVGSideOffsetY  float32 `xml:",attr"`
	SVGFrontOffsetX float32 `xml:",attr"`
	SVGFrontOffsetY float32 `xml:",attr"`
}

func (Model) Parse

func (model Model) Parse() Types.Model

type OpenSoundControl

type OpenSoundControl struct {
}

type OperatingTemperature

type OperatingTemperature struct {
	Low  float32 `xml:",attr"`
	High float32 `xml:",attr"`
}

type PhysicalDescription

type PhysicalDescription struct {
	Emitters              []Emitter    `xml:"Emitters>Emitter"`
	Filters               []Filter     `xml:"Filters>Filter"`
	ColorSpace            ColorSpace   `xml:"ColorSpace"`
	AdditionalColorSpaces []ColorSpace `xml:"AdditionalColorSpaces>ColorSpace"`
	Gamuts                []Gamut      `xml:"Gamuts>Gamut"`
	DMXProfiles           []DMXProfile `xml:"DMXProfiles>DMXProfile"`
	CRIs                  []CRIGroup   `xml:"CRIs>CRIGroup"`
	Connectors            []Connector  `xml:"Connectors>Connector"`
	Properties            Properties   `xml:"Properties"`
}

func (PhysicalDescription) Parse

func (physicalDescription PhysicalDescription) Parse() Types.PhysicalDescription

type PinPatch

type PinPatch struct {
	ToWiringObject XMLNodeReference `xml:",attr"`
	FromPin        int              `xml:",attr"`
	ToPin          int              `xml:",attr"`
}

func (PinPatch) Parse

func (pinpatch PinPatch) Parse() Types.PinPatch

type Point

type Point struct {
	DMXPercentage float32 `xml:",attr"`
	CFC0          float32 `xml:",attr"`
	CFC1          float32 `xml:",attr"`
	CFC2          float32 `xml:",attr"`
	CFC3          float32 `xml:",attr"`
}

func (Point) Parse

func (object Point) Parse() Types.Point

type PosiStageNet

type PosiStageNet struct {
}

type Preset

type Preset struct {
}

type PrismFacet

type PrismFacet struct {
	Color    ColorCIE `xml:",attr"`
	Rotation Rotation `xml:",attr"`
}

func (PrismFacet) Parse

func (attr PrismFacet) Parse() Types.PrismFacet

type Properties

type Properties struct {
	OperatingTemperature *OperatingTemperature `xml:"OperatingTemperature"`
	Weight               *Weight               `xml:"Weight"`
	PowerConsumption     any                   `xml:"PowerConsumption"`
	LegHeight            *LegHeight            `xml:"LegHeight"`
}

func (Properties) Parse

func (object Properties) Parse() Types.Properties

type Protocol

type Protocol struct {
	RDM              []RDM              `xml:"FTRDM"`
	ArtNet           []ArtNet           `xml:"Art-Net"`
	SACN             []SACN             `xml:"sACN"`
	PosiStageNet     []PosiStageNet     `xml:"PosiStageNet"`
	OpenSoundControl []OpenSoundControl `xml:"OpenSoundControl"`
	CITP             []CITP             `xml:"CITP"`
}

func (Protocol) Parse

func (protocol Protocol) Parse() Types.Protocol

type RDM

type RDM struct {
	ManufacturerID   Hex                  `xml:",attr"`
	DeviceModelID    Hex                  `xml:",attr"`
	SoftwareVersions []RDMSoftwareVersion `xml:"SoftwareVersionID"`
}

func (RDM) Parse

func (protcol RDM) Parse() Types.RDM

type RDMDMXPersonality

type RDMDMXPersonality struct {
	Value   Hex              `xml:",attr"`
	DMXMode XMLNodeReference `xml:",attr"` // reference to DMX Mode
}

func (RDMDMXPersonality) Parse

func (protcol RDMDMXPersonality) Parse() Types.RDMDMXPersonality

type RDMSoftwareVersion

type RDMSoftwareVersion struct {
	Value            Hex                 `xml:",attr"`
	DMXPersonalities []RDMDMXPersonality `xml:"DMXPersonality"`
}

func (RDMSoftwareVersion) Parse

type Relation

type Relation struct {
	Name     string           `xml:",attr"`
	Master   XMLNodeReference `xml:",attr"`
	Follower XMLNodeReference `xml:",attr"`
	Type     string           `xml:",attr"` //enum with "Multiply" or "Override"
}

func (Relation) Parse

func (dmx Relation) Parse() Types.Relation

type Revision

type Revision struct {
	Text       string  `xml:",attr"`
	Date       XMLTime `xml:",attr"`
	UserID     uint    `xml:",attr"`
	ModifiedBy string  `xml:",attr"`
}

func (Revision) Parse

func (revision Revision) Parse() Types.Revision

type Rotation

type Rotation [3][3]float32

func (*Rotation) UnmarshalXMLAttr

func (dest *Rotation) UnmarshalXMLAttr(attr xml.Attr) error

type SACN

type SACN struct {
	Maps []Map `xml:"Map"`
}

func (SACN) Parse

func (protcol SACN) Parse() Types.SACN

type Structure

type Structure struct {
	Name                      string           `xml:",attr"`
	Model                     string           `xml:",attr"`
	Position                  Matrix           `xml:",attr"`
	LinkedGeometry            XMLNodeReference `xml:",attr"`
	StructureType             string           `xml:",attr"` // enum
	CrossSectionType          string           `xml:",attr"` // enum
	CrossSectionHeight        float32          `xml:",attr"`
	CrossSectionWallThickness float32          `xml:",attr"`
	TrussCrossSection         string           `xml:",attr"`
	Geometries
}

func (Structure) Parse

func (geometry Structure) Parse() Types.Structure

type SubChannelSet

type SubChannelSet struct {
	Name            string           `xml:",attr"`
	PhysicalFrom    float32          `xml:",attr"`
	PhysicalTo      float32          `xml:",attr"`
	SubPhysicalUnit XMLNodeReference `xml:",attr"`
	DMXProfile      XMLNodeReference `xml:",attr"`
}

func (SubChannelSet) Parse

func (dmx SubChannelSet) Parse() Types.SubChannelSet

type SubPhysicalUnit

type SubPhysicalUnit struct {
	Type         string  `xml:",attr"`
	PhysicalUnit string  `xml:",attr"`
	PhysicalFrom float32 `xml:",attr"`
	PhysicalTo   float32 `xml:",attr"`
}

func (SubPhysicalUnit) Parse

func (attr SubPhysicalUnit) Parse() Types.SubPhysicalUnit

type Support

type Support struct {
	Name             string  `xml:",attr"`
	Model            string  `xml:",attr"`
	Position         Matrix  `xml:",attr"`
	SupportType      string  `xml:",attr"` //enum
	RopeCrossSection string  `xml:",attr"`
	RopeOffset       Vector3 `xml:",attr"`
	CapacityX        float32 `xml:",attr"`
	CapacityY        float32 `xml:",attr"`
	CapacityZ        float32 `xml:",attr"`
	CapacityXX       float32 `xml:",attr"`
	CapacityYY       float32 `xml:",attr"`
	CapacityZZ       float32 `xml:",attr"`
	ResistanceX      float32 `xml:",attr"`
	ResistanceY      float32 `xml:",attr"`
	ResistanceZ      float32 `xml:",attr"`
	ResistanceXX     float32 `xml:",attr"`
	ResistanceYY     float32 `xml:",attr"`
	ResistanceZZ     float32 `xml:",attr"`
	Geometries
}

func (Support) Parse

func (geometry Support) Parse() Types.Support

type Vector3

type Vector3 struct {
	X float32
	Y float32
	Z float32
}

func (*Vector3) UnmarshalXMLAttr

func (dest *Vector3) UnmarshalXMLAttr(attr xml.Attr) error

type Weight

type Weight struct {
	Value float32 `xml:",attr"`
}

type Wheel

type Wheel struct {
	Name       string      `xml:",attr"`
	WheelSlots []WheelSlot `xml:"Slot"`
}

func (Wheel) Parse

func (attr Wheel) Parse() Types.Wheel

type WheelSlot

type WheelSlot struct {
	Name             string            `xml:",attr"`
	Color            *ColorCIE         `xml:",attr,omitempty"`
	Filter           *XMLNodeReference `xml:",attr,omitempty"` // ref to Physical/Filter
	MediaFileName    *string           `xml:",attr,omitempty"`
	PrismFacets      []PrismFacet      `xml:"Facet"`
	AnimationSystems []AnimationSystem `xml:"AnimationSystem"`
}

func (WheelSlot) Parse

func (attr WheelSlot) Parse() Types.WheelSlot

type WiringObject

type WiringObject struct {
	Name              string     `xml:",attr"`
	Model             string     `xml:",attr"`
	ConnectorType     string     `xml:",attr"`
	Position          Matrix     `xml:",attr"`
	ComponentType     string     `xml:",attr"` //enum
	SignalType        string     `xml:",attr"`
	PinCount          int        `xml:",attr"`
	ElectricalPayLoad float32    `xml:",attr"`
	VoltageRangeMax   float32    `xml:",attr"`
	VoltageRangeMin   float32    `xml:",attr"`
	FrequencyRangeMax float32    `xml:",attr"`
	FrequencyRangeMin float32    `xml:",attr"`
	MaxPayLoad        float32    `xml:",attr"`
	Voltage           float32    `xml:",attr"`
	SignalLayer       int        `xml:",attr"`
	CosPhi            float32    `xml:",attr"`
	FuseCurrent       float32    `xml:",attr"` // in ampere
	FuseRating        string     `xml:",attr"` //enum
	Orientation       string     `xml:",attr"` //enum
	WireGroup         string     `xml:",attr"`
	PinPatches        []PinPatch `xml:"PinPatch"`
	Geometries
}

func (WiringObject) Parse

func (geometry WiringObject) Parse() Types.WiringObject

type XMLNodeReference

type XMLNodeReference = string

type XMLTime

type XMLTime struct {
	time.Time
}

func (*XMLTime) UnmarshalXMLAttr

func (b *XMLTime) UnmarshalXMLAttr(attr xml.Attr) error

type YesNoBool

type YesNoBool bool

Custom type for Yes/No -> bool conversion

func (*YesNoBool) UnmarshalXMLAttr

func (b *YesNoBool) UnmarshalXMLAttr(attr xml.Attr) error

Implement xml.Unmarshaler

Jump to

Keyboard shortcuts

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