Implement support for Get/SetParameterAttributes
This commit is contained in:
1 parent
6385f54888
commit
bf9517c652
10 files changed
+524
-56
No files matched your search
+5
-1
@@ -100,7 +100,7 @@ router.get(`/devices/:id.csv`, async (ctx) => {
|
||||
|
||||
ctx.body = new stream.PassThrough();
|
||||
ctx.body.write(
|
||||
"Parameter,Object,Object timestamp,Writable,Writable timestamp,Value,Value type,Value timestamp\n"
|
||||
"Parameter,Object,Object timestamp,Writable,Writable timestamp,Value,Value type,Value timestamp,Notification,Notification timestamp,Access list,Access list timestamp\n"
|
||||
);
|
||||
|
||||
for (const k of Object.keys(res[0]).sort()) {
|
||||
@@ -114,6 +114,10 @@ router.get(`/devices/:id.csv`, async (ctx) => {
|
||||
p.value != null ? `"${p.value[0].toString().replace(/"/g, '""')}"` : "",
|
||||
p.value != null ? p.value[1] : "",
|
||||
p.valueTimestamp,
|
||||
p.notification,
|
||||
p.notificationTimestamp,
|
||||
p.accessList ? p.accessList.join(", ") : "",
|
||||
p.accessListTimestamp,
|
||||
];
|
||||
ctx.body.write(row.map((r) => (r != null ? r : "")).join(",") + "\n");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user