Integrator Resources

The official home for NAI Support

Not sure where to start? Try Quick Start Guide or ask a question below!

Toggle Components with Visual Button
JavaScript Form Processing

nai rly cfg

nai rly cfg

Explanation

About This Sample Application Code

This sample application code is designed to interface with North Atlantic Industries (NAI) embedded function modules using their Software Support Kit (SSK). It includes various header files and contains a function to initialize relay configurations.

Included Header Files

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

These standard C libraries provide basic functionalities: - stdio.h: Standard Input/Output functions. - ctype.h: Character handling functions. - stdlib.h: General utility functions. - string.h: String handling functions.

Common Sample Program Include Files

These header files might be part of NAI’s Software Support Kit (SSK) and provide specific functionalities required for NAI boards:

#include "include/naiapp_interrupt.h"
#include "include/naiapp_interrupt_ether.h"
#include "include/naiapp_boardaccess_query.h"
#include "include/naiapp_boardaccess_access.h"
#include "include/naiapp_boardaccess_display.h"
#include "include/naiapp_boardaccess_utils.h"

Common CAN Sample Program Include Files

CAN-related configurations and functions are included here:

#include "nai_rly_cfg.h"
#include "nai_rly_int.h"

naibrd Include Files

These files seem to deal with specific board functionalities and relay operations:

#include "nai.h"
#include "naibrd.h"
#include "functions/naibrd_rly.h"

Function Definition: initializeRLYConfigurations

This function initializes the relay configurations for a specific NAI board or module.

Function Prototype

void initializeRLYConfigurations(int32_t cardIndex, int32_t module, int32_t modid, int32_t channel, int32_t maxChannel, int32_t minChannel);

Parameters

  • int32_t cardIndex: The index of the card.

  • int32_t module: The specific module on the card.

  • int32_t modid: The module identifier.

  • int32_t channel: The specific channel within the module.

  • int32_t maxChannel: The maximum allowable channel.

  • int32_t minChannel: The minimum allowable channel.

Function Body

{
   inputRLYConfig.cardIndex = cardIndex;
   inputRLYConfig.module = module;
   inputRLYConfig.modid = modid;
   inputRLYConfig.channel = channel;
   inputRLYConfig.maxChannel = maxChannel;
   inputRLYConfig.minChannel = minChannel;
}

The function sets the relay configuration parameters by directly assigning the provided values to the fields in the inputRLYConfig structure. This structure is implicitly assumed to be globally available for use in other parts of the program.

Summary

This code sets up the initial environment for interfacing with NAI embedded modules, specifically focusing on initializing relay configurations. The included header files suggest extensive use of NAI’s own APIs and utilities to handle interrupts, board access, and display functions.

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>

/* Common Sample Program include files */
#include "include/naiapp_interrupt.h"
#include "include/naiapp_interrupt_ether.h"
#include "include/naiapp_boardaccess_query.h"
#include "include/naiapp_boardaccess_access.h"
#include "include/naiapp_boardaccess_display.h"
#include "include/naiapp_boardaccess_utils.h"

/* Common CAN Sample Program include files */
#include "nai_rly_cfg.h"
#include "nai_rly_int.h"
/* naibrd include files */
#include "nai.h"
#include "naibrd.h"
#include "functions/naibrd_rly.h"

/**************************************************************************************************************/
/**
<summary>

</summary>
*/
/**************************************************************************************************************/
void initializeRLYConfigurations(int32_t cardIndex, int32_t module, int32_t modid, int32_t channel, int32_t maxChannel, int32_t minChannel)
{
   inputRLYConfig.cardIndex = cardIndex;
   inputRLYConfig.module = module;
   inputRLYConfig.modid = modid;
   inputRLYConfig.channel = channel;
   inputRLYConfig.maxChannel = maxChannel;
   inputRLYConfig.minChannel = minChannel;

}

Help Bot

X