S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_sk_scheduler.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
26#ifndef SOPC_SK_SCHEDULER_H_
27#define SOPC_SK_SCHEDULER_H_
28
29#include "sopc_sk_scheduler.h"
30
31#include <stdbool.h>
32#include <stdint.h>
33
34#include "sopc_builtintypes.h"
35#include "sopc_enums.h"
36#include "sopc_sk_builder.h"
37#include "sopc_sk_manager.h"
38#include "sopc_sk_provider.h"
39
40// minimal period for update (2s). Period used when no keys are available
41#define SOPC_SK_SCHEDULER_UPDATE_TIMER_MIN 2000
42
43// maximal period for update (by default no max)
44#define SOPC_SK_SCHEDULER_UPDATE_TIMER_MAX UINT32_MAX
45
47
49 SOPC_SKBuilder* skb,
50 SOPC_SKProvider* skp,
51 SOPC_SKManager* skm,
52 uint32_t msPeriod);
55
67
75
90 SOPC_SKBuilder* skb,
91 SOPC_SKProvider* skp,
92 SOPC_SKManager* skm,
93 uint32_t msPeriod);
94
102
109
117
118#endif /* SOPC_SK_SCHEDULER_H_ */
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Security Keys Builder: provides update function to retrieve keys from the Security Keys Provider and ...
Security Keys Manager: manages local storage of the keys retrieved from the Security Keys Provider fo...
Security Keys Provider: source providing the keys for SKS.
Security Keys Scheduler: it schedules the periodic update of keys retrieved from provider and set in ...
SOPC_ReturnStatus(* SOPC_SKscheduler_Start_Func)(SOPC_SKscheduler *sko)
Definition sopc_sk_scheduler.h:53
SOPC_ReturnStatus SOPC_SKscheduler_Stop(SOPC_SKscheduler *sko)
Stops a Security Keys Scheduler.
SOPC_ReturnStatus SOPC_SKscheduler_Start(SOPC_SKscheduler *sko)
Starts a Security Keys Scheduler.
SOPC_ReturnStatus(* SOPC_SKscheduler_AddTask_Func)(SOPC_SKscheduler *sko, SOPC_SKBuilder *skb, SOPC_SKProvider *skp, SOPC_SKManager *skm, uint32_t msPeriod)
Definition sopc_sk_scheduler.h:48
SOPC_SKscheduler * SOPC_SKscheduler_Create(void)
Creates an instance of a default SOPC_SKscheduler. This scheduler manages only one task in a dedicate...
void(* SOPC_SKscheduler_StopAndClear_Func)(SOPC_SKscheduler *sko)
Definition sopc_sk_scheduler.h:54
SOPC_ReturnStatus SOPC_SKscheduler_AddTask(SOPC_SKscheduler *sko, SOPC_SKBuilder *skb, SOPC_SKProvider *skp, SOPC_SKManager *skm, uint32_t msPeriod)
Creates a periodic task to call builder every msPeriod milliseconds. Ownership of SOPC_SKBuilder and ...
void SOPC_SKscheduler_StopAndClear(SOPC_SKscheduler *sko)
Stops a Security Keys Scheduler and deallocate data bytes content. This object should not be used aft...
Bytes Security Keys Builder structure.
Definition sopc_sk_builder.h:51
Definition sopc_sk_manager.h:86
Security Keys Provider structure.
Definition sopc_sk_provider.h:56
Security Keys Scheduler structure.
Definition sopc_sk_scheduler.h:61
SOPC_SKscheduler_Start_Func ptrStart
Definition sopc_sk_scheduler.h:63
void * data
Definition sopc_sk_scheduler.h:65
SOPC_SKscheduler_AddTask_Func ptrAddTask
Definition sopc_sk_scheduler.h:62
SOPC_SKscheduler_StopAndClear_Func ptrClear
Definition sopc_sk_scheduler.h:64