feat: build vehicle data platform and production pipeline

This commit is contained in:
lingniu
2026-07-14 12:35:33 +08:00
parent b452be3b94
commit bb59303a4b
270 changed files with 88016 additions and 1975 deletions

View File

@@ -12,6 +12,7 @@ var ErrResponseFrameTooShort = errors.New("gb32960 response frame too short")
const (
responseSuccess = byte(0x01)
responseError = byte(0x02)
responseCommand = byte(0xfe)
encryptNone = byte(0x01)
)
@@ -37,7 +38,11 @@ func AutoResponse(raw []byte, env envelope.FrameEnvelope) ([]byte, bool, error)
if timestamp := responseTime(raw, command); !timestamp.IsZero() {
body = encodeGBTime(timestamp)
}
return buildResponse(raw[0], command, responseSuccess, raw[4:21], body), true, nil
responseFlag := responseSuccess
if command == 0x05 && env.AuthenticationEnforced && env.AuthenticationStatus != "accepted" {
responseFlag = responseError
}
return buildResponse(raw[0], command, responseFlag, raw[4:21], body), true, nil
}
func shouldRespond(command byte) bool {