APIs, concepts, guides, and more

◆ NetworkEniGenerate()

RSINetworkEniResult NetworkEniGenerate ( )
Description:

Generate the network ENI file, EtherCAT.xml. NetworkEniGenerate internally invokes the rsiconfig command with the -eni option, using the path specified by MotionController::CreationParameter::RmpPath.


Note
On Linux systems, it also passes the CreationParameters::CpuAffinity and CreationParameters::NicPrimary (that were used when the MotionController was created) to rsiconfig. This command generates the EtherCAT Network Information (ENI) file, which is used to describe the network topology and configuration of all EtherCAT nodes.
Returns
RSINetworkEniResult indicating the status of the operation.
Return values
RSINetworkEniResult::RSINetworkEniResultSUCCESSENI file generated successfully.
RSINetworkEniResult::RSINetworkEniResultMISSING_ESI_FILESAdd ESI file with correct Vendor, Product, Revision to the ESI folder.
RSINetworkEniResult::RSINetworkEniResultCONFIG_NOT_DETECTEDFailed Configuration creation or 0 slaves to add to it. Did you move your ESI folder?
RSINetworkEniResult::RSINetworkEniResultNODE_INFO_ERRORError(s) in NodeInfo.xml.
RSINetworkEniResult::RSINetworkEniResultUNKNOWN_FAILUREFall through case. Contact RSI with details about your changes to the various XMLs.
RSINetworkEniResult::RSINetworkEniResultENI_FILE_ALREADY_EXISTSUse overload which overwrites or be glad we didn't just delete your old file.
RSINetworkEniResult::RSINetworkEniResultFAILED_TO_CREATE_ENI_BUILDERDid not create ENIBuilder internal object.
RSINetworkEniResult::RSINetworkEniResultTOO_MANY_NODESThe ENI was generated properly but has more nodes than can be supported by the RMP.
RSINetworkEniResult::RSINetworkEniResultTOO_MANY_PDO_INPUTSThe ENI has too many PDO Inputs for RMP.
RSINetworkEniResult::RSINetworkEniResultTOO_MANY_PDO_OUTPUTSThe ENI has too many PDO Outputs for RMP.
RSINetworkEniResult::RSINetworkEniResultTOO_MANY_PDO_BYTESThe total size of the PDO bytes is too large for RMP.
RSINetworkEniResult::RSINetworkEniResultDISCOVERED_ZERO_NODESThere were no nodes discovered on the network so we could not generate an ENI file.
Note
Ensure that the NIC and the path specified are accessible, especially on Linux, where additional privileges might be required.
The function might throw exceptions if errors occur during execution:
Exceptions
RsiErrorwith RSIErrorMessage::RSI_METHOD_UNSUPPORTED in INtime.
RsiErrorwith RSIErrorMessage::RSI_ERROR_MESSAGE_DYNAMIC If rsiconfig returns non-zero or cannot run.
Sample Code:
RSINetworkEniResult result = motionController->NetworkEniGenerate();
{
std::cerr << "Failed to generate ENI file." << std::endl;
std::cerr << "Error from rsiconfig: " << motionController->NetworkEniGenerateOutputGet() << std::endl;
}
RSINetworkEniResult
NetworkEniGenerate return values.
Definition rsienums.h:1382
@ RSINetworkEniResultSUCCESS
ENI file generated successfully.
Definition rsienums.h:1383
See also
rsiconfig, NetworkEniGenerateOutputGet