mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-04-21 03:38:15 +00:00
Update sdv_packager (#6)
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* Copyright (c) 2025-2026 ZF Friedrichshafen AG
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Apache License Version 2.0 which is available at
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Thomas Pfleiderer - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef VSS_CODING_TX_H
|
||||
#define VSS_CODING_TX_H
|
||||
|
||||
@@ -16,7 +29,7 @@
|
||||
/**
|
||||
* @brief VSS code generator coding class.
|
||||
* Creates the code out of templates
|
||||
*/
|
||||
*/
|
||||
class CVSSVDCodingTX : public CCodeGeneratorBase, CVSSHelper
|
||||
{
|
||||
|
||||
@@ -28,94 +41,94 @@ public:
|
||||
CVSSVDCodingTX(const std::string& rsPrefix) : m_ssPrefix(rsPrefix) {}
|
||||
|
||||
/**
|
||||
* @brief create vehicle device content for the IDL file of a TX signal
|
||||
* @param[in] vssParts Interface in vss style separated in parts
|
||||
* @param[in] vecFunctions container of all functions of a single vss definition
|
||||
* @return content of the vehicle device part of a IDL Interface of a TX signal
|
||||
*/
|
||||
* @brief create vehicle device content for the IDL file of a TX signal
|
||||
* @param[in] vssParts Interface in vss style separated in parts
|
||||
* @param[in] vecFunctions container of all functions of a single vss definition
|
||||
* @return content of the vehicle device part of a IDL Interface of a TX signal
|
||||
*/
|
||||
std::string Code_VD_TXIDLList(const std::vector<std::string>& vssParts,
|
||||
const std::vector <SFunctionVDDefinition>& vecFunctions) const;
|
||||
|
||||
/**
|
||||
* @brief fill the KeyWordMap with all required strings
|
||||
* @param[in] signal signal definition structure to fill the KeyWordMap
|
||||
* @param[in] mapKeywords KeyWordMap to be filled
|
||||
*/
|
||||
* @brief fill the KeyWordMap with all required strings
|
||||
* @param[in] signal signal definition structure to fill the KeyWordMap
|
||||
* @param[in] mapKeywords KeyWordMap to be filled
|
||||
*/
|
||||
void GetKeyWordMap(const SSignalVDDefinition& signal, CKeywordMap& mapKeywords) const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief create single or multiple lines containing include files
|
||||
* @param[in] vssOriginalNoDot vss string without points e.g. VehicleChassisSteeringWheelAngle
|
||||
* @return content of a single interface
|
||||
*/
|
||||
* @brief create single or multiple lines containing include files
|
||||
* @param[in] vssOriginalNoDot vss string without points e.g. VehicleChassisSteeringWheelAngle
|
||||
* @return content of a single interface
|
||||
*/
|
||||
std::string Code_VD_TXIncludes(const std::string& vssOriginalNoDot) const;
|
||||
|
||||
/**
|
||||
* @brief create a single line containing a interface for vehicle device
|
||||
* @param[in] functionName function which is part of the interface
|
||||
* @param[in] vssWithColons vss string (complete version) with colons as separator
|
||||
* @return content of a single interface
|
||||
*/
|
||||
* @brief create a single line containing a interface for vehicle device
|
||||
* @param[in] functionName function which is part of the interface
|
||||
* @param[in] vssWithColons vss string (complete version) with colons as separator
|
||||
* @return content of a single interface
|
||||
*/
|
||||
std::string Code_VD_TXInterface(const std::string& functionName, const std::string& vssWithColons) const;
|
||||
|
||||
/**
|
||||
* @brief create a single line containing a interface entry for vehicle device
|
||||
* @param[in] functionName function which is part of the interface
|
||||
* @param[in] vssWithColons vss string (complete version) with colons as separator
|
||||
* @return content of a single interface entry
|
||||
*/
|
||||
* @brief create a single line containing a interface entry for vehicle device
|
||||
* @param[in] functionName function which is part of the interface
|
||||
* @param[in] vssWithColons vss string (complete version) with colons as separator
|
||||
* @return content of a single interface entry
|
||||
*/
|
||||
std::string Code_VD_TXInterfaceEntry(const std::string& functionName, const std::string& vssWithColons) const;
|
||||
|
||||
/**
|
||||
* @brief create list of interfaces (TX signals) for IDL file (Vehicle Device)
|
||||
* @param[in] spaces string containing only space characters for aligning
|
||||
* @param[in] function function definition structure
|
||||
* @return content of a single interface entry
|
||||
*/
|
||||
* @brief create list of interfaces (TX signals) for IDL file (Vehicle Device)
|
||||
* @param[in] spaces string containing only space characters for aligning
|
||||
* @param[in] function function definition structure
|
||||
* @return content of a single interface entry
|
||||
*/
|
||||
std::string Code_VD_TXIDLInterface(const std::string& spaces, const SFunctionVDDefinition& function) const;
|
||||
|
||||
/**
|
||||
* @brief create function definition part (TX signals) for vehicle device
|
||||
* @param[in] function function definition structure
|
||||
* @return content of a single function declaration
|
||||
*/
|
||||
* @brief create function definition part (TX signals) for vehicle device
|
||||
* @param[in] function function definition structure
|
||||
* @return content of a single function declaration
|
||||
*/
|
||||
std::string Code_VD_TXFunction(const SFunctionVDDefinition& function) const;
|
||||
|
||||
/**
|
||||
* @brief Rest signal (TX signals) for vehicle device cpp file
|
||||
* @param[in] function function definition structure
|
||||
* @return content of a single signal reset implementation
|
||||
*/
|
||||
* @brief Rest signal (TX signals) for vehicle device cpp file
|
||||
* @param[in] function function definition structure
|
||||
* @return content of a single signal reset implementation
|
||||
*/
|
||||
std::string Code_VD_TXResetSignal(const SFunctionVDDefinition& function) const;
|
||||
|
||||
/**
|
||||
* @brief create function implementation part (TX signals) for vehicle device cpp file
|
||||
* @param[in] function function definition structure
|
||||
* @param[in] className class name of the signal
|
||||
* @return content of a single function implementation
|
||||
*/
|
||||
* @brief create function implementation part (TX signals) for vehicle device cpp file
|
||||
* @param[in] function function definition structure
|
||||
* @param[in] className class name of the signal
|
||||
* @return content of a single function implementation
|
||||
*/
|
||||
std::string Code_VD_TXFunctionImplementation(const SFunctionVDDefinition& function, const std::string& className) const;
|
||||
|
||||
/**
|
||||
* @brief create single variable definition (TX signals) for vehicle device header
|
||||
* @param[in] signalName name of the signal
|
||||
* @return content of a single variable definition
|
||||
*/
|
||||
* @brief create single variable definition (TX signals) for vehicle device header
|
||||
* @param[in] signalName name of the signal
|
||||
* @return content of a single variable definition
|
||||
*/
|
||||
std::string Code_VD_TXVariable(const std::string& signalName) const;
|
||||
|
||||
/**
|
||||
* @brief create single variable initialization (TX signals) for vehicle device cpp file
|
||||
* @param[in] function which is part of the interface
|
||||
* @return content of a single variable initialization
|
||||
*/
|
||||
* @brief create single variable initialization (TX signals) for vehicle device cpp file
|
||||
* @param[in] function which is part of the interface
|
||||
* @return content of a single variable initialization
|
||||
*/
|
||||
std::string Code_VD_TXVariableInitialization(const SFunctionVDDefinition& function) const;
|
||||
|
||||
/**
|
||||
* @brief create check if all interfaces are valid (TX signals) for vehicle device cpp file
|
||||
* @param[in] vecFunctions container of all functions of a single vss definition
|
||||
* @return content to check if all interfaces are valid
|
||||
*/
|
||||
* @brief create check if all interfaces are valid (TX signals) for vehicle device cpp file
|
||||
* @param[in] vecFunctions container of all functions of a single vss definition
|
||||
* @return content to check if all interfaces are valid
|
||||
*/
|
||||
std::string Code_VD_TXVariableCheckInitialization(const std::vector <SFunctionVDDefinition>& vecFunctions) const;
|
||||
|
||||
std::string m_ssPrefix; ///< prefix, used by cmake library and signal definition in signal_identifier.h file.
|
||||
|
||||
Reference in New Issue
Block a user