IsConnected logic

This commit is contained in:
2026-09-08 15:41:44 +01:00
parent 56c7081e8f
commit 1ad9dd4ab7
3 changed files with 27 additions and 14 deletions
+16 -1
View File
@@ -20,7 +20,6 @@ const (
IRSDK_BROADCASTMSGNAME string = "IRSDK_BROADCASTMSG"
fileMapSize uint32 = 1164 * 1024
connTimeout int64 = 30
stConnected int = 1
)
const (
@@ -117,6 +116,22 @@ const (
csFocusAtDriver int = 0 // ctFocusAtDriver + car number...
)
// StatusField - START
const (
irsdk_stConnected = 0x01
)
func (i *IBT) SessionStatusConnected() bool {
return i.Headers.Status == irsdk_stConnected
}
// NOTE: move this away from here
// func (i *IBT) SessionTimedOut() bool {
// return sdk.lastValidData+connTimeout > time.Now().Unix()
// }
// StatusField - END
// Camera positions
type bitfieldValue struct {
Value int