Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

How to access active events of data point


  • I'm using a watchlist while getting point data.

                <ma-watch-list-get on-points-change="points = $points" watch-list-xid="WL_82d8df54-77dc-4792-ac1d-e81dbfbc609d"></ma-watch-list-get>
                <ma-get-point-value points="points"></ma-get-point-value>
                {{points[0]}}
    

    result of this code does not include activeEvents object. But when im using <ma-point-value>

    ,"activeEvents":[{"comments":null,"acknowledged":false,"active":true,"acknowledgedMessage":null,"returnToNormalTimestamp":0,"message":"12_12 - nokta12_12 was below 48,00","id":1142335,"eventType":{"dataSourceId":2,"dataPointId":25,"pointEventDetectorId":101,"duplicateHandling":"IGNORE","eventType":"DATA_POINT","eventSubtype":null,"referenceId2":101,"referenceId1":25,"systemMessage":false,"rateLimited":false,"publisherId":-1},"acknowledgedTimestamp":0,"acknowledgedByUserId":0,"activeTimestamp":1585143934176,"acknowledgedByUsername":null,"alarmLevel":"CRITICAL","status":""}]
    

    i can access activeEvents object. How can i access to activeEvents without using <ma-point-value>. Because
    I want to check if the point has activeEvents.. like this

    <div ng-if="points[0].activeEvents">
            ...
    <div>
    

  • Nope because how the system is implemented - as seen in the API:

    maPointEventManager service in module ngMangoServices
    Provides an EventManager factory pointing to the point-value websocket endpoint at '/rest/v1/websocket/point-value'
    
    All methods available to EventManager are available.
    Used by <ma-get-point-value> directive.
    

    So the only way to get around this is to write your own controller or component to provide just the data you want...

    Fox