1、获取ProgItemType中的Flag项
'ProgItemType Flag
Public Function GetProgItemType_Flag(ByVal Area As Integer, ByVal FileType As Integer, ByVal FileTypeNo As Integer) As Short
Dim stemp As Integer = (FileTypeNo << 6) + (FileType << 2) + Area
'Dim btemp() As Byte = iByte2H(itemp)
Return stemp
End Function
2、获取ProgItemType中的PicFIndex项
'ProgItemType PicFIndex
Public Function GetProgItemType_PicFIndex(ByVal PicFIndex As Integer) As Short
Dim stemp As Integer = PicFIndex
'Dim btemp() As Byte = iByte2H(itemp)
Return stemp
End Function
3、获取ProgItemType中的Effect项
'ProgItemType Effect
Public Function GetProgItemType_Effect(ByVal Effin As Integer, ByVal Effout As Integer) As Integer
Dim itemp As Integer = (Effout << 6) + Effin
'Dim btemp() As Byte = iByte4H(itemp)
Return itemp
End Function
4、获取ProgItemType中的SpeedStay项
'ProgItemType SpeedStay
Public Function GetProgItemType_SpeedStay(ByVal Speedin As Integer, ByVal Speedout As Integer, ByVal Stay As Integer) As Integer
Dim itemp As Integer = (Stay << 8) + (Speedout << 4) + Speedin
'Dim btemp() As Byte = iByte4H(itemp)
Return itemp
End Function
5、获取ProgItemType中的Schedule项
'ProgItemType Schedule
Public Function GetProItemType_Schedule(ByVal OnMinute As Integer, ByVal OnHour As Integer, ByVal OffMinute As Integer, ByVal OffHour As Integer, ByVal Week As Integer) As Integer
Dim itemp As Integer = (Week << 25) + (7 << 22) + (OffHour << 17) + (OnHour << 12) + (OffMinute << 6) + (OnMinute)
'Dim btemp() As Byte = iByte4H(itemp)
Return itemp
End Function
6、获取ProgItemType内容
'获取 ProgItemType
Public Function GetProgItemType(ByVal Flag As Short, ByVal PicFIndex As Short, ByVal Effect As Integer, ByVal SpeedStay As Integer, ByVal Schedule As Integer) As Byte()
Dim btemp(16) As Byte
Dim i As Integer
For i = 0 To iByte2H(Flag).Length - 1
btemp(i) = iByte2H(Flag)(i)
Next
For i = 2 To i + iByte2H(PicFIndex).Length - 1
btemp(i) = iByte2H(PicFIndex)(i - 2)
Next
For i = 4 To i + iByte4H(Effect).Length - 1
btemp(i) = iByte4H(Effect)(i - 4)
Next
For i = 8 To i + iByte4H(SpeedStay).Length - 1
btemp(i) = iByte4H(SpeedStay)(i - 8)
Next
For i = 12 To i + iByte4H(Schedule).Length - 1
btemp(i) = iByte4H(Schedule)(i - 12)
Next
Return btemp
End Function