-
Notifications
You must be signed in to change notification settings - Fork 96
Main websocket fixes 3 #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Changes to be committed:
modified: src/mtconnect/sink/rest_sink/rest_service.cpp
- RestService::createAssetRoutings
- added asset, assets commands to the handler routings
- added assetsById command to to the idHandler routings
- RestService::createSampleRoutings
- added code to set the request->parameter<int32_t>("count") parameter to 100 if it's not instantiated.
wsobel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll review and test the changes. We need to have some test cases to validate that this works. I will see about the test framework to make that happen. The current WebSocket tests are just for the websocket layer. We need to have a headless test environment as well where we pass JSON commands and they get parsed.
|
It does require adding an additional websocket command "assetsById". I was actually considering expanding my current Websocket program to test all of the Websocket Functionality. |
|
I would like to build a test framework so we can also run it headless like we do with the REST requests. It would bypass the connection and upgrading to websockets and just send the JSON commands directly through to the parser and dispatcher. This will make it easier to validate that all the routes are working correctly. |
|
Got you. I was going to take a look at doing something similar to that. I had intended to make the Shop Floor meeting this morning but had to take care of some other personal business.
From: William Sobel ***@***.***>
Sent: Wednesday, December 17, 2025 5:06 AM
To: mtconnect/cppagent ***@***.***>
Cc: David Wickelhaus ***@***.***>; Author ***@***.***>
Subject: Re: [mtconnect/cppagent] Main websocket fixes 3 (PR #586)
[https://avatars.githubusercontent.com/u/1302665?s=20&v=4]wsobel left a comment (mtconnect/cppagent#586)<#586 (comment)>
I would like to build a test framework so we can also run it headless like we do with the REST requests. It would bypass the connection and upgrading to websockets and just send the JSON commands directly through to the parser and dispatcher. This will make it easier to validate that all the routes are working correctly.
—
Reply to this email directly, view it on GitHub<#586 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AC4DQ4NHKWZRTXMPHYFL3ZD4CETJJAVCNFSM6AAAAACPDU4RPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNRUGYYTCMZVGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
update to correct the issue "Webocket does not respond to asset or assets request #578" #580