' This VB-Script contains definitions of all constants that can be used
' with the PCAN-Explorer 6 J1939 Add-in
'-----------------------------------------------------------------------------
' Copyright (c) 2022 PEAK-System Technik GmbH.  All rights reserved.

' Enumeration TJ1939Property
const propClaimStatus = 1
const propClientName = 2
const propWindowHandle = 3
const propDevice = 4
const propNetName = 5
const propResetOnBusOff = 6
const propIncludeEchoes = 7
const propReceiving = 8
const propAddressName = 9
const propPreferredAddress = 10
const propUseAddressingProtocol = 11
const propMonitoring = 12
const propConnected = 13
const propClaimedAddress = 14
const propFilter = 15
const propNotifyPropertyChanges = 16
const propNotifyAddressClaiming = 17
const propNotifyAddressLost = 18
const propNotifySessionEvents = 19
const propNotifyMessageReceived = 20
const propPacksCountOnReadSessions = 21
const propPacksCountOnWriteSessions = 22
const propRetriesCountOnWriteSessions = 23
const propReCTSCountOnReadSessions = 24
const propRcvEventHandle = 25
const propReassembleIncomingPackets = 26
const propInterpacketTime = 27
const propErrorFrames = 28
const propPGNsToRejectOnRTS = 29
const propIncludeTPMessages = 30

' Enumeration TJ1939Error
const errOK = 0
const errNotConnected = 1
const errAlreadyConnected = 2
const errAlreadySending = 3
const errWrongParamValue = 4
const errAddressBeingClaimed = 5
const errAddressLost = 6
const errAddrNotClaimed = 7
const errAddrClaimFailed = 8
const errQueueEmpty = 9
const errCANObject = 10
const errResource = 11
const errAborted = 12
const errTimeout = 14
const errUnknownError = &H10000

' Enumeration TFilterMask
const tfmNone = 0
const tfmPGN = 1
const tfmPriority = 2
const tfmSource = 4
const tfmDestination = 8

' Enumeration TClaimedStatus
const tcsNone = 0
const tcsNotClaim = 1
const tcsClaiming = 2
const tcsClaimed = 3
const tcsCannotClaim = 4
const tcsReleased = 5

' Enumeration TCANDevices
const tcdUnknown = 0
const tcdPeakcan = 1
const tcdIsa = 2
const tcdDng = 3
const tcdPci = 4
const tcdUsb = 5
const tcdPcCard = 6
const tcdVirtual = 7
const tcdLAN = 8

' Enumeration TCANHardware
const tchNone = 0
const tchDongle = 1
const tchPlugInCard = 2   
const tchUSB = 3
const tchPCCard = 4
