idz: Add idz2 encoders

This commit is contained in:
b166fe48b91eb09f279b79a4ecf57b2f8f0d3705
2021-02-03 23:43:42 +00:00
committed by da5669c09fdb0a288ba01e259a609d7779ac7fc9
parent 2474879c89
commit f2434cef7e
28 changed files with 637 additions and 92 deletions
+10 -1
View File
@@ -1,6 +1,6 @@
import { CreateProfileResponse } from "../response/createProfile";
export function createProfile(res: CreateProfileResponse) {
export function createProfile1(res: CreateProfileResponse) {
const buf = Buffer.alloc(0x0020);
// Shares message type code with the "generic" response
@@ -9,3 +9,12 @@ export function createProfile(res: CreateProfileResponse) {
return buf;
}
export function createProfile2(res: CreateProfileResponse) {
const buf = Buffer.alloc(0x0030);
buf.writeInt16LE(0x0001, 0x0000);
buf.writeInt32LE(res.aimeId, 0x0008);
return buf;
}