diff --git a/cmd/dict_generator/main.go b/cmd/dict_generator/main.go index 1df4ed4..dd758be 100644 --- a/cmd/dict_generator/main.go +++ b/cmd/dict_generator/main.go @@ -49,31 +49,31 @@ func main() { func PrintAppId(w io.Writer) { fmt.Fprintf(w, "export const app = {\n") - fmt.Fprintf(w, " %-20s %d,\n", "Accounting:", 3) - fmt.Fprintf(w, " %-20s %d,\n", "ChargingControl:", 4) - fmt.Fprintf(w, " %-20s %d,\n", "Gx:", 16777238) - fmt.Fprintf(w, " %-20s %d,\n", "Sy:", 16777302) + fmt.Fprintf(w, " %-20s %d,\n", "Accounting:", 3) + fmt.Fprintf(w, " %-20s %d,\n", "ChargingControl:", 4) + fmt.Fprintf(w, " %-20s %d,\n", "Gx:", 16777238) + fmt.Fprintf(w, " %-20s %d,\n", "Sy:", 16777302) fmt.Fprintf(w, "}\n") fmt.Fprintf(w, "\n") } func PrintCmd(w io.Writer) { fmt.Fprintf(w, "export const cmd = {\n") - fmt.Fprintf(w, " %-20s %d,\n", "AA:", 265) - fmt.Fprintf(w, " %-20s %d,\n", "Accounting:", 271) - fmt.Fprintf(w, " %-20s %d,\n", "CreditControl:", 272) - fmt.Fprintf(w, " %-20s %d,\n", "ReAuth:", 258) - fmt.Fprintf(w, " %-20s %d,\n", "SessionTermination:", 275) - fmt.Fprintf(w, " %-20s %d,\n", "SpendingLimit:", 8388635) + fmt.Fprintf(w, " %-20s %d,\n", "AA:", 265) + fmt.Fprintf(w, " %-20s %d,\n", "Accounting:", 271) + fmt.Fprintf(w, " %-20s %d,\n", "CreditControl:", 272) + fmt.Fprintf(w, " %-20s %d,\n", "ReAuth:", 258) + fmt.Fprintf(w, " %-20s %d,\n", "SessionTermination:", 275) + fmt.Fprintf(w, " %-20s %d,\n", "SpendingLimit:", 8388635) fmt.Fprintf(w, "}\n") fmt.Fprintf(w, "\n") } func PrintFlags(w io.Writer) { fmt.Fprintf(w, "export const flag = {\n") - fmt.Fprintf(w, " %-20s 0x%x, // vendor bit\n", "V:", 0x80) - fmt.Fprintf(w, " %-20s 0x%x, // mandatory bit\n", "M:", 0x40) - fmt.Fprintf(w, " %-20s 0x%x, // private bit\n", "P:", 0x20) + fmt.Fprintf(w, " %-20s 0x%x, // vendor bit\n", "V:", 0x80) + fmt.Fprintf(w, " %-20s 0x%x, // mandatory bit\n", "M:", 0x40) + fmt.Fprintf(w, " %-20s 0x%x, // private bit\n", "P:", 0x20) fmt.Fprintf(w, "}\n") fmt.Fprintf(w, "\n") } diff --git a/example/diam/const.js b/example/diam/const.js index c3d6351..5f70023 100644 --- a/example/diam/const.js +++ b/example/diam/const.js @@ -1,17 +1,17 @@ export const cmd = { - Accounting: 271, - CreditControl: 272, + Accounting: 271, + CreditControl: 272, } export const app = { - Accounting: 3, - ChargingControl: 4, + Accounting: 3, + ChargingControl: 4, } export const flag = { - V: 0x80, // vendor bit - M: 0x40, // mandatory bit - P: 0x20, // private bit + V: 0x80, // vendor bit + M: 0x40, // mandatory bit + P: 0x20, // private bit } export const code = { DestinationHost: 293,