kim_marivoet

updated

15 years ago

0

1097

December 11th, 2011 06:00

trigger an EBR event multiple times

Hi,

I'm doing some experiments with JCasScript aorund EBR and I'm seeing some strange results.

- create a clip:

CASScript>clipNew testebr

Clip Properties:

    Name:                testebr

    Creation Date:       2011.12.11 02:03:33 GMT

    Size:                0

    Number of Tags:      0

    Number of Blobs:     0

    Retention Class:    

    Retention Seconds:   -2

    Modified:            True

    EBR Enabled :        False

- enable EBR with a period:

CASScript>clipEnableEBRWithPeriod 12345

Clip Properties:

    Name:                testebr

    Creation Date:       2011.12.11 02:03:33 GMT

    Size:                0

    Number of Tags:      0

    Number of Blobs:     0

    Retention Class:    

    Retention Seconds:   0

    Modified:            True

    EBR Enabled :        True

    EBR Event Triggered: False

    EBR Period :         12345

    EBR Class :         

- So far so good. Now we write the clip:

CASScript>clipWrite

New Clip ID: FOJ60QNJ8GNHQe3HA8CSOC64KQRG416GMN20LI0S8L5295OG6B5VJ

- and we trigger an EBR event:

CASScript>clipTriggerEBR

Clip Properties:

    Name:                testebr

    Creation Date:       2011.12.11 02:03:33 GMT

    Size:                0

    Number of Tags:      0

    Number of Blobs:     0

    Retention Class:    

    Retention Seconds:   0

    Modified:            False

    EBR Enabled :        True

    EBR Event Triggered: True

    EBR Event Time :     2011.12.11 02:05:39 GMT

    EBR Period :         12345

    EBR Class :   

(so, EBR event triggered == true).

- we try to do that again:

CASScript>clipTriggerEBR

SDK Error Occurred:

     Error Number: -10160

     System Error: 0

     Error:        FP_EBR_OVERRIDE_ERR

     Error Class:  Server Error

     Trace:        FPClipTree::TriggerEBREvent(-)

This is as expected, and a described in the spec.

However, if we close the clip, and open it again:

CASScript>clipOpen C441HTBGDFJNNe5TJLD3Q273B0UG416GMLTO6I0B9K4VP7NNQ3RUO

Clip Properties:

    Name:                test2

    Creation Date:       2011.12.11 01:44:20 GMT

    Size:                0

    Number of Tags:      0

    Number of Blobs:     0

    Retention Class:    

    Retention Seconds:   0

    Modified:            False

    EBR Enabled :        True

    EBR Event Triggered: False

    EBR Period :         12345

    EBR Class :         

'EBR event triggered' has gone to 'false' again. So, let's try to trigger it again:

CASScript>clipTriggerEBR

Clip Properties:

    Name:                test2

    Creation Date:       2011.12.11 01:44:20 GMT

    Size:                0

    Number of Tags:      0

    Number of Blobs:     0

    Retention Class:    

    Retention Seconds:   0

    Modified:            False

    EBR Enabled :        True

    EBR Event Triggered: True

    EBR Event Time :     2011.12.11 02:08:22 GMT

    EBR Period :         12345

    EBR Class :

And it worked, contradicting the spec:

An EBR event can be triggered only once. If an attempt is made to

trigger the event multiple times, the call returns the

FP_EBR_OVERRIDE_ERR error.

Also, the EBR event time has changed.

Am I interpreting the spec wrongly, is it a problem in JCasScript, ... ?

Tx,

Kim