• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP2SQL
  • Event
  • 5.0.0

Event Class

(LogManager::Event)

The Event struct represents a single logged event. For example, CDPAlarm Set or CDPAlarm Clear. More...

Header: #include <Event>
  • List of all members, including inherited members

Public Variables

unsigned code = 0
EventData data
uint64_t id = 0
double logstampSec = 0
std::string sender
unsigned status = 0
double timestampSec = 0

Related Non-Members

typedef EventData
typedef EventSenderTags

Detailed Description

The Event struct represents a single logged event. For example, CDPAlarm Set or CDPAlarm Clear.

Member Variable Documentation

unsigned Event::code = 0

This variable holds the event code flags.

Common event codes used in the CDP framework (note that multiple flags can be set at the same time):

NameCodeDescription
AlarmSet0x1The alarm's Set flag/state was set. The alarm changed state to "Unack-Set" (The Unack flag was set if not already set).
AlarmClr0x2The alarm's Set flag was cleared. The Unack state is unchanged.
AlarmAck0x4The alarm changed state from "Unacknowledged" to "Acknowledged". The Set state is unchanged.
AlarmReprise0x40A repetition/update of an event that has been reported before. Courtesy of late subscribers.
SourceObjectUnavailable0x100The provider of the event has become unavailable (disconnected or similar).
NodeBoot0x40000000The provider reports that the CDPEventNode has just booted.

EventData Event::data

This variable holds a map of key-value pairs describing the event.

Unlike EventSenderTags, the event data will change during logging - it can be different for each event.

uint64_t Event::id = 0

This variable holds the system-wide global event ID (CDP eventId + application handle).

Note, the ID is unique only until application reboot.

double Event::logstampSec = 0

This variable holds the timestamp when the event was logged.

The logstamp is helpful when extracting data by chunks as events might arrive out of order to the logger in a multi-application system.

std::string Event::sender

This variable holds the sender of the event.

This is the long name (starting with the application name) of the node that sent the event. It also mathces the key in EventSenderTags.

unsigned Event::status = 0

This variable holds the status of the alarm/event.

See the Alarm Status Defines in CDPAlarm documentation.

double Event::timestampSec = 0

This variable holds the timestamp when the event was sent. The timestampSec matches the xAxis in the value log.

Related Non-Members

typedef LogManager::EventData

Event data is a map of key-value pairs describing the event.

Unlike EventSenderTags, the event data will change during logging - it can be different for each event.

typedef LogManager::EventSenderTags

A map of event sender names to tags associated with the sender.

The event sender tags are static and will not change during logging.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top