include/events/polarity.h
static inline void caerPolarityEventValidate(caerPolarityEvent event, caerPolarityEventPacket packet) {
	if (!caerPolarityEventIsValid(event)) {
		SET_NUMBITS32(event->data, VALID_MARK_SHIFT, VALID_MARK_MASK, 1);

		// Also increase number of events and valid events.
		// Only call this on (still) invalid events!
		caerEventPacketHeaderSetEventNumber(&packet->packetHeader,
			caerEventPacketHeaderGetEventNumber(&packet->packetHeader) + 1);
		caerEventPacketHeaderSetEventValid(&packet->packetHeader,
			caerEventPacketHeaderGetEventValid(&packet->packetHeader) + 1);
	}
	else {
#if !defined(LIBCAER_LOG_NONE)
		caerLog(CAER_LOG_CRITICAL, "Polarity Event", "Called caerPolarityEventValidate() on already valid event.");
#endif
	}
}
/**
 * Validate the current event by setting its valid bit to true
 * and increasing the event packet's event count and valid
 * event count. Only works on events that are invalid.
 * DO NOT CALL THIS AFTER HAVING PREVIOUSLY ALREADY
 * INVALIDATED THIS EVENT, the total count will be incorrect.
 *
 * @param event a valid PolarityEvent pointer. Cannot be NULL.
 * @param packet the PolarityEventPacket pointer for the packet containing this event. Cannot be NULL.
 */
Validate the current event by setting its valid bit to true
and increasing the event packet's event count and valid
event count. Only works on events that are invalid.

@param event a valid PolarityEvent pointer. Cannot be NULL.
@param packet the PolarityEventPacket pointer for the packet containing this event. Cannot be NULL.
Validate the current event by setting its valid bit to true and increasing the event packet ' s event count and valid event count . Only works on events that are invalid . @param event a valid PolarityEvent pointer . Cannot be NULL . @param packet the PolarityEventPacket pointer for the packet containing this event . Cannot be NULL .
static inline void caerPolarityEventValidate(caerPolarityEvent event, caerPolarityEventPacket packet) {
	if (!caerPolarityEventIsValid(event)) {
		SET_NUMBITS32(event->data, VALID_MARK_SHIFT, VALID_MARK_MASK, 1);
		caerEventPacketHeaderSetEventNumber(&packet->packetHeader,
			caerEventPacketHeaderGetEventNumber(&packet->packetHeader) + 1);
		caerEventPacketHeaderSetEventValid(&packet->packetHeader,
			caerEventPacketHeaderGetEventValid(&packet->packetHeader) + 1);
	}
	else {
#if !defined(LIBCAER_LOG_NONE)
		caerLog(CAER_LOG_CRITICAL, "Polarity Event", "Called caerPolarityEventValidate() on already valid event.");
#endif
	}
}
static inline void caerPolarityEventValidate ( caerPolarityEvent event , caerPolarityEventPacket packet ) { if ( ! caerPolarityEventIsValid ( event ) ) { SET_NUMBITS32 ( event -> data , VALID_MARK_SHIFT , VALID_MARK_MASK , 1 ) ; caerEventPacketHeaderSetEventNumber ( & packet -> packetHeader , caerEventPacketHeaderGetEventNumber ( & packet -> packetHeader ) + 1 ) ; caerEventPacketHeaderSetEventValid ( & packet -> packetHeader , caerEventPacketHeaderGetEventValid ( & packet -> packetHeader ) + 1 ) ; } else { #if ! defined ( LIBCAER_LOG_NONE ) caerLog ( CAER_LOG_CRITICAL , " " , " " ) ; #endif } }
Validate the current event by setting its valid bit to true
 and increasing the event packet's event count and valid
 event count.
Validate the current event by setting its valid bit to true and increasing the event packet ' s event count and valid event count .
// Also increase number of events and valid events. // Only call this on (still) invalid events!