common.bas

来自「dsp6713开发板的许多例程.对入门特别有用」· BAS 代码 · 共 50 行

BAS
50
字号
Attribute VB_Name = "common"
Option Explicit

'Read/Write status codes
'########## RTDX(TM) ##########'
Global Const ENoDataAvailable As Long = &H8003001E
Global Const EEndOfLogFile As Long = &H80030002
Global Const FAIL As Long = &H80004005
Global Const SUCCESS As Long = &H0
'########## RTDX(TM) ##########'

' Data Type ID Constants
Global Const TYPE_8BIT_INTEGER As String = "8-Bit Integer"
Global Const TYPE_16BIT_INTEGER As String = "16-Bit Integer"
Global Const TYPE_32BIT_INTEGER As String = "32-Bit Integer"
Global Const TYPE_32BIT_FLOAT As String = "32-Bit Float"
Global Const TYPE_64BIT_FLOAT As String = "64-Bit Float"

' Channel Type ID Constants
Global Const TYPE_READ_ONLY As String = "R"
Global Const TYPE_WRITE_ONLY As String = "W"

' Range of columns for each channel
Public Type Column_Break_Points
    Start_Point As Integer      ' Column start point
    End_Point As Integer        ' Column end point
End Type

' Member variables for method calls
Public Type RTDX_Method_Attributes
    stat As Long                ' Open/Close Method status
    CHANNEL_OPEN As Boolean     ' Channel flag
    read_status As Long         ' Returned status code from Read
    member_counter As Long      ' Member counter for Read
    write_status As Long        ' Returned status code from Write
    message_counter As Long     ' Message counter for Read
    buffer_status As Long       ' Buffer status of Write
    Write_Value_I4 As Long      ' Value sent to Write
    Board As String             ' Board that channel is communicating with
    Processor As String         ' Processor that channel is communicating with
End Type

' Event Structure
Public Type RTDX_Event
    name As String
    id As Long
End Type

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) ' Prototype for sleep routine

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?