Dualsonic 모델 시리얼 번호 쓰기 에러 #2
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
-> 입력 시리얼 번호 : 412505111111
-> 시리얼 번호 읽기 : 410527004231(시리얼번호 불량)
-> 시리얼번호 입력란의 끝 3자리 와 앞3자리가 변경 입력(정상)

시리얼 번호를 4 byte unsigned 정수로 사용하는데 표시할 때 signed 정수로 취급해서 발생한 문제임.
0x00000000-0x7FFFFFFF 범위의 숫자는 unsigned와 signed의 값이 같으나
0x80000000-0xFFFFFFFF 범위의 숫자는 signed에서 음수로 표현된다.
디바이스 f/w에서는 unsigned로 취급하고 공정s/w로 보낼 때 signed로 보내어 발생한 이슈임.
아래의 예에서 1,2는 unsigned와 signed가 같은 경우, 3,4,5는 다른 경우를 보여 줌
시리얼번호가 음수로 표시되는 3,4,5의 경우, 시리얼번호의 보수를 취하여 양수로 변환한다.
계산 식: 4294967296 (0x100000000) - 음수시리얼번호절대값
시리얼번호에 SerialParsing 값을 더하는 의미: 모델코드의 의미
10진수로 표시된 값을 16진수로 바꾸어 보면 아래와 같이 5바이트만 유효한 값을 갖는다, 4,3,2,1바이트는 모두 0
Private Const PROSerialParsing As ULong = 111669149696 -> 0x1A00000000
Private Const LUXSerialParsing As ULong = 0
Private Const ALPHASerialParsing As ULong = 412316860416 -> 0x6000000000
위 값을 4바이트 시리얼번호에 더하면 시리얼번호는 유지하고 그 상위 바이트에 값을 덧씌우는 형태가 된다.
모델코드+시리얼번호의 형식이 됨
예) 모델코드: 111669149696(0x1A00000000) , 시리얼번호: 2001123456(0x7746B880)
-> 모델코드+시리얼번호 = 0x1A7746B880