profinet

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockTypeAlarmNotificationHigh     = 0x0001
	BlockTypeAlarmNotificationLow      = 0x0002
	BlockTypeIODWriteReqHeader         = 0x0008
	BlockTypeIODReadReqHeader          = 0x0009
	BlockTypeIODWriteResHeader         = 0x8008
	BlockTypeIODReadResHeader          = 0x8009
	BlockTypeARBlockReq                = 0x0101
	BlockTypeIOCRBlockReq              = 0x0102
	BlockTypeAlarmCRBlockReq           = 0x0103
	BlockTypeExpectedSubmoduleBlockReq = 0x0104
	BlockTypeARBlockRes                = 0x8101
	BlockTypeIOCRBlockRes              = 0x8102
	BlockTypeAlarmCRBlockRes           = 0x8103
	BlockTypeModuleDiffBlock           = 0x8104
	BlockTypeARRPCBlockReq             = 0x0105
	BlockTypeARRPCBlockRes             = 0x8105
	BlockTypeIODControlReq             = 0x0110
	BlockTypeIODControlRes             = 0x8110
	BlockTypeReleaseBlock              = 0x0114
	BlockTypeIOXBlockReq               = 0x0116
	BlockTypeIOXBlockRes               = 0x8116
	BlockTypeReadRecordInputReq        = 0x8028
	BlockTypeReadRecordOutputReq       = 0x8029
	BlockTypeI_M0                      = 0x0020
	BlockTypeI_M1                      = 0x0021
	BlockTypeI_M2                      = 0x0022
	BlockTypeI_M3                      = 0x0023
	BlockTypeI_M4                      = 0x0024
	BlockTypeDiagnosisData             = 0x0010
)

PROFINET block types

View Source
const (
	OpConnect      = 0 // AR establishment
	OpRelease      = 1 // AR release
	OpRead         = 2 // Read operation
	OpWrite        = 3 // Write operation
	OpControl      = 4 // Control operation
	OpReadImplicit = 5 // Implicit read (for PDEV)
)

PROFINET IO operation types

View Source
const (
	ServiceConnect      = 0
	ServiceRelease      = 1
	ServiceRead         = 2
	ServiceWrite        = 3
	ServiceControl      = 4
	ServiceReadImplicit = 5
)

PROFINET service IDs (operation numbers for DCE/RPC)

View Source
const (
	AlarmTypeDiagnosis               = 0x0001
	AlarmTypeProcess                 = 0x0002
	AlarmTypePull                    = 0x0003
	AlarmTypePlug                    = 0x0004
	AlarmTypeStatus                  = 0x0005
	AlarmTypeUpdate                  = 0x0006
	AlarmTypeRedundancy              = 0x0007
	AlarmTypeControlledBySupv        = 0x0008
	AlarmTypeReleasedBySupv          = 0x0009
	AlarmTypePlugWrongSubmodule      = 0x000A
	AlarmTypeReturnOfSubmodule       = 0x000B
	AlarmTypeDiagnosisDisappears     = 0x000C
	AlarmTypeMultipleMediaRedundancy = 0x000D
	AlarmTypePortDataChange          = 0x000E
	AlarmTypeSyncDataChange          = 0x000F
	AlarmTypeIsochronousModeProbl    = 0x0010
	AlarmTypeNetworkComponent        = 0x0011
	AlarmTypeTimeDataChange          = 0x0012
	AlarmTypeDynamic                 = 0x0013
	AlarmTypeUploadRetrievalNot      = 0x001E
	AlarmTypePullModule              = 0x001F
)

Alarm types

Variables

View Source
var Decoder = &decoder.StreamDecoder{
	Type:        types.Type_NC_PROFINET,
	Name:        servicePROFINET,
	Description: "PROFINET is an industrial Ethernet standard for automation and real-time process control",
	PostInit: func(d *decoder.StreamDecoder) error {
		var err error
		profinetLog, _, err = logging.InitZapLogger(
			decoderconfig.Instance.Out,
			"profinet",
			decoderconfig.Instance.Debug,
		)
		return err
	},
	CanDecode: func(client, server []byte) bool {

		return canDecodePROFINET(client) || canDecodePROFINET(server)
	},
	DeInit: func(sd *decoder.StreamDecoder) error {
		return profinetLog.Sync()
	},
	Factory: &profinetReader{},
	Typ:     core.TCP,
}

Decoder for protocol analysis and writing audit records to disk.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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