Skip to content

Commit 494ea86

Browse files
committed
first commit
0 parents  commit 494ea86

File tree

9 files changed

+1932
-0
lines changed

9 files changed

+1932
-0
lines changed

.gitignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*

IoTConnector

5.45 MB
Binary file not shown.

IoTConnector-Config.xml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!-- Filename: IoTConnector-Config.xml -->
2+
<!-- Refer to https://techdocs.zebra.com/dcs/scanners/iot-connector/about/ for IoT Connector info -->
3+
<config name="IoT Connector">
4+
<settings>
5+
<spd_log>
6+
<!-- Sinks section - define output target(s) of IoT Connector -->
7+
<!-- Multiple sink types are supported. Refer to https://github.com/gabime/spdlog/wiki/4.-Sinks -->
8+
<sinks>
9+
<!-- HTTP Post endpoint -->
10+
<sink type="http_sink_mt" name="http_sink_mt">
11+
<!-- URL of the server instance -->
12+
<property key="url" value="http://localhost:3000/" />
13+
<!-- HTTP headers for the request. Use semicolon(;) to separate multiple headers. Eg : header1;header2 -->
14+
<property key="request_header" value="Host;Content-Type;Accept" />
15+
<!-- Set the value to "true" to enable the batch mode. You can set the logging time interval and/or number of log entries(batch size) per batch -->
16+
<property key="batch_mode" value="false" />
17+
<!-- Number of logs per batch -->
18+
<property key="batch_size" value="0" />
19+
<!-- Set the value to true to get HTTP request/response information in a file named "logs/iotConnector-verbose.log"-->
20+
<property key="verbose_mode" value="false" />
21+
<!-- Pattern of a single log entry. Please refer to https://github.com/gabime/spdlog/wiki/3.-Custom-formatting for more information. -->
22+
<property key="log_pattern" value='{"event":{"time": "%Y-%m-%d %H:%M:%S", "level": "%^%l%$", "hostname": "%J", "message": "%v"}}' />
23+
<!-- Log level to be recorded. 2 = INFO, 3 = WARNING, 4 = ERROR, 5 = CRITICAL 6 = LOG_OFF, 0,1 = TRACE,DEBUG (Works only with debug build) -->
24+
<property key="log_level" value="2" />
25+
</sink>
26+
<!-- Command line output (only when IoTConnector executable run in this mode) -->
27+
<sink type="stdout_color_sink_mt" name="stdout_color_sink_mt">
28+
<property key="log_pattern" value="[%Y-%m-%d %H:%M:%S] %v" />
29+
<property key="log_level" value="2" />
30+
</sink>
31+
</sinks>
32+
</spd_log>
33+
<!-- Log Elements section -->
34+
<!-- Regular expression wildcards for model and serial may be defined -->
35+
<!-- Refer to https://www.freeformatter.com/cron-expression-generator-quartz.html for the schedule pattern -->
36+
<log-elements>
37+
<!-- Configure get-statistics entries - intended for collection of scanner data -->
38+
<get-statistics enabled="true">
39+
<!-- Daily at 2am -->
40+
<group model=".*" serial=".*" schedule="0 2 0 * * *">
41+
<!-- Scanner-attribute-ids to be retrieved -->
42+
<scanner-attribute-ids>25003</scanner-attribute-ids>
43+
</group>
44+
</get-statistics>
45+
<!-- Configure check-health entries - intended to periodically confirm scanner availability -->
46+
<check-health enabled="false">
47+
<!-- Every 30 mins -->
48+
<group model=".*" serial=".*" schedule="0 0/30 * * * *">
49+
<!-- Scanner-attribute-ids to be retrieved -->
50+
<scanner-attribute-ids>534,533</scanner-attribute-ids>
51+
</group>
52+
</check-health>
53+
<!-- Configure an on-agent-startup entry -->
54+
<on-agent-start-up enabled="true">
55+
<group model=".*" serial=".*">
56+
<!-- Scanner-attribute-ids to be retrieved -->
57+
<scanner-attribute-ids>534,533</scanner-attribute-ids>
58+
</group>
59+
</on-agent-start-up>
60+
<!-- Enable/disable on-system-shutdown entry -->
61+
<on-system-shutdown enabled="true" />
62+
<!-- Configure entries for scanner device attach -->
63+
<on-attach enabled="true">
64+
<group model=".*" serial=".*">
65+
<!-- Scanner-attribute-ids to be retrieved -->
66+
<scanner-attribute-ids>534,533</scanner-attribute-ids>
67+
</group>
68+
</on-attach>
69+
<!-- Enable/disable entry for scanner device detach -->
70+
<on-detach enabled="true" />
71+
<!-- Used to enable/disable log entries on barcode events. Non printable characters in the barcode will be replaced by "_"(ASCII 0x5F) -->
72+
<on-barcode enabled="true" />
73+
<!-- Used to enable/disable log entries on firmware download events -->
74+
<on-firmware-download-start enabled="true" />
75+
<on-firmware-download-progress enabled="true" />
76+
<on-firmware-download-end enabled="true" />
77+
<on-firmware-download-error enabled="true" />
78+
<!-- on-config-name-change is used to enable/disable log entries when a config name change occurs. This will be logged using the same schedule as check-health -->
79+
<!-- The timeout value specifies the time to wait before logging a config change -->
80+
<!-- The max timeout value is 60000 milliseconds (60 seconds). -->
81+
<on-config-name-change enabled="true" timeout="5000" />
82+
<!-- on-non-decode-event is used to enable/disable log entries if MP7xxx is enabled for non decode events -->
83+
<on-non-decode-event enabled="true"/>
84+
</log-elements>
85+
</settings>
86+
</config>

IoTConnector.exe

992 KB
Binary file not shown.

README.md

64 Bytes

zebra-scanner-iot-connector

app.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const express = require('express')
2+
const app = express()
3+
const port = 3000
4+
5+
6+
app.use(express.urlencoded({
7+
extended: true
8+
}))
9+
10+
app.post('/', (req, res) => {
11+
console.log(req.body)
12+
res.send()
13+
})
14+
15+
app.listen(port, () => {
16+
console.log(`Example app listening on port ${port}`)
17+
})
18+
19+
// Start IoT Connector
20+
// This will execute IoT Connector service in background
21+
// To keep the terminal window open, run "start IoTConnector"
22+
const { exec } = require('child_process');
23+
exec('IoTConnector', (error, stdout, stderr) => {
24+
if (error) {
25+
throw error;
26+
}
27+
console.log(stdout);
28+
});

0 commit comments

Comments
 (0)