repetition_period
Change-Id: I1833125dab6f9df9fc9745ea20532b3b9c612754
This commit is contained in:
parent
d72681ad0c
commit
49daa80fbf
|
@ -38,7 +38,7 @@
|
|||
"properties": {
|
||||
"cbe_name": { "type": "string" },
|
||||
"category": { "$ref": "#/definitions/category" },
|
||||
"rep_period": { "$ref": "#/definitions/repetition_period" },
|
||||
"repetition_period": { "$ref": "#/definitions/repetition_period" },
|
||||
"num_of_bcast": { "$ref": "#/definitions/number_of_broadcasts" },
|
||||
"scope": { "$ref": "#/definitions/scope" },
|
||||
"warning_period_sec": { "$ref": "#/definitions/warning_period_sec" },
|
||||
|
|
|
@ -132,7 +132,7 @@ struct cbc_message {
|
|||
|
||||
const char *cbe_name; /* name of the CBE originating this SMSCB */
|
||||
enum cbsp_category priority;
|
||||
uint16_t rep_period; /* repetition period (1..4095) */
|
||||
uint16_t rep_period; /* repetition period (1..4095) in units of 1.883s */
|
||||
bool extended_cbch; /* basic (false) or extended (true) CBCH */
|
||||
uint32_t warning_period_sec; /* warning period in seconds (0xffffffff = unlimited) */
|
||||
uint16_t num_bcast; /* number of broadcasts requested (0=unlimited) */
|
||||
|
|
|
@ -460,9 +460,15 @@ static int json2cbc_message(struct cbc_message *out, void *ctx, json_t *in, cons
|
|||
}
|
||||
|
||||
/* Repetition Period (O) */
|
||||
jtmp = json_object_get(in, "repetition_period");
|
||||
if (jtmp) {
|
||||
/* FIXME */
|
||||
rc = json_get_integer_range(&tmp, in, "repetition_period", 0, 4095);
|
||||
if (rc == 0)
|
||||
out->rep_period = tmp;
|
||||
else if (rc == -ENOENT){
|
||||
*errstr = "CBCMSG 'repetiton_period' is mandatory";
|
||||
return rc;
|
||||
} else {
|
||||
*errstr = "CBCMSG 'repetiton_period' out of range";
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Number of Broadcasts (O) */
|
||||
|
|
Loading…
Reference in New Issue