-
Notifications
You must be signed in to change notification settings - Fork 195
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
Does bacnet have a cov subscription recovery strategy? #477
Comments
COV subscriptions with indefinite lifetimes (aka permanent) are discouraged. See Q/A 7.6 in the BTL Implementation Guildelines
Subscriptions include a subscriberProcessIdentifier that is unique per subscribing device. Any subsequent subscriptions to the same monitored object will replace the existing subscriptions with matching process-id and device source address. Example code from the library:
The SubscribeCOV services also includes a "cancellationRequest" option to delete the subscription. |
thank you, sir |
Is this lifetime in seconds? I set this value to 300, 600, and 6000, and it is difficult to receive a notify. The value I tested is about 3s to send a notify.
|
The handler_cov_timer_seconds() is expecting to have a number of elapsed seconds called during a main loop or task or thread:
|
Thank you, I understand, but the parameter of this function is uint32_t, and the minimum value is 1. If the status changes, but the notification is sent after 1s, the delay will definitely be greater than 1s. This will affect real-time performance. |
handler_cov_timer_seconds() is only handling the timeout of the subscription, which doesn't affect COV Notification speed. handler_cov_fsm() or handler_cov_task() is the function that handles the COV notifications and can be called as fast as the CPU allows. You can rewrite the h_cov.c if you require to have better event driven performance for your system - it is just an example of basic COV functionality. |
emmm, what I mean is probably similar to this. If you let it delay 1s, wy_is_people will be monitored once every second. If you let it delay 10ms, the monitoring will be more timely, but handler_cov_timer_seconds is not 1s from the last call. (Am I understanding it wrong, or is there a better solution) |
Where does your application call handler_cov_fsm() or handler_cov_task() ? For example, using FreeRTOS, I typically run a BACnet Task at 1ms:
then I have the BACnet Tasks like this:
|
Thanks, I roughly got it, I'm building cov into a separate task now.
|
Hi
I would highly recommend that, while you do so, you make the whole COV detection system event-driven.
… On Sep 19, 2023, at 08:52, 董奇才 ***@***.***> wrote:
Thanks, I roughly got it, I'm building cov into a separate task now.
void wy_updata_cov(void)
{
AIR_INFO m_air_info_data = {0};
struct mstimer COV_Timer;
mstimer_set(&COV_Timer, 1 * 1000);
while(1)
{
if (mstimer_expired(&COV_Timer)) {
mstimer_reset(&COV_Timer);
handler_cov_timer_seconds(mstimer_interval(&COV_Timer)/1000);
}
m_air_info_data = wy_get_air_info();
AIR_Info_Set(0, m_air_info_data);
handler_cov_task();
vTaskDelay(10 / portTICK_PERIOD_MS);
}
}
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
If device A initiates a permanent subscription to device B, but device B fails and restarts, how does device A know that it needs to re-initiate the subscription? Does device A need to delete the previous subscription, and if so, how to delete it?
The text was updated successfully, but these errors were encountered: