Checking correctness of CANoe configuration file chosen and providing a notification on the Frontend for...












0














When user is selecting a wrong CANoe cfg file for a particular variant, user should be notified of the wrong cfg file. The correctness of the cfg file should be validated against the content( for example: based on the dbc files loaded into each configuration)



Please find the below code for the current implementation:
I need to do a check based on the content probably dbc( the resp. messages and signals within the cfg) and user has to be notified on the Frontend if wrong cfg is selected.
Currently I have mentioned the respective configurations but I haven't done any content check for the configurations.



private void button2_Click(object sender, EventArgs e)                      
//Function to run/start CANoe measurement
{
// Execute CANoe(Obtain CANoe application objectg)
var mApp = new CANoe.Application();
var mMsr = (CANoe.Measurement)mApp.Measurement;
try
{
if (tcu == '1')
{
CANoe = new cCANoe1();
}
else if (tcu == '2')
{
CANoe = new cCANoe2();
}
log.WritetoFile("Opening CANoe configuration");
Console.WriteLine("Opening CANoe configuration");
// mApp.Open("C:\Users\uidr3024\Downloads\SRLCam4T0_Validation_ControlTool\cfg\SVT_SRLCam4T0_025B.cfg", true, true);
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
log.WritetoFile("Starting measurement ");
CANoe.startMeasurement(this);
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.Message);
log.WritetoFile("Exception:" + ex.Message);
MessageBox.Show("CANoe application error", "Error");
}

if (textBox1.Text != String.Empty && System.IO.File.Exists(textBox1.Text))
{
// The textbox has a filename in it, use it
mApp.Open(textBox1.Text, true, true);
}
else
{
// The user hasn't selected a config file, launch with default
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
}
}


Content validation in the cfg should be done and the user should be notified if wrong cfg is selected.










share|improve this question









New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Cfg files never contain the dbc message instance definitions, or signal definitions. cfg only stores the dbc file path necessary for compilation. So you cannot check this through cfg file alone. You need to specify the attributes you wish to consider correct in a cfg.
    – VioletVynil
    4 hours ago










  • Yes, that is correct. But currently I am not able to fetch which of the attributes I need to specify to differentiate between different configurations. Once I get that info, I can run through multiple configurations and provide a notification in-case user loads wrong cfg.
    – Pavan Kulkarni
    3 hours ago












  • You get versioning info and generation date in the first 20 lines of the cfg file if you open it by text editor. I will check after the holidays.
    – VioletVynil
    2 hours ago
















0














When user is selecting a wrong CANoe cfg file for a particular variant, user should be notified of the wrong cfg file. The correctness of the cfg file should be validated against the content( for example: based on the dbc files loaded into each configuration)



Please find the below code for the current implementation:
I need to do a check based on the content probably dbc( the resp. messages and signals within the cfg) and user has to be notified on the Frontend if wrong cfg is selected.
Currently I have mentioned the respective configurations but I haven't done any content check for the configurations.



private void button2_Click(object sender, EventArgs e)                      
//Function to run/start CANoe measurement
{
// Execute CANoe(Obtain CANoe application objectg)
var mApp = new CANoe.Application();
var mMsr = (CANoe.Measurement)mApp.Measurement;
try
{
if (tcu == '1')
{
CANoe = new cCANoe1();
}
else if (tcu == '2')
{
CANoe = new cCANoe2();
}
log.WritetoFile("Opening CANoe configuration");
Console.WriteLine("Opening CANoe configuration");
// mApp.Open("C:\Users\uidr3024\Downloads\SRLCam4T0_Validation_ControlTool\cfg\SVT_SRLCam4T0_025B.cfg", true, true);
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
log.WritetoFile("Starting measurement ");
CANoe.startMeasurement(this);
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.Message);
log.WritetoFile("Exception:" + ex.Message);
MessageBox.Show("CANoe application error", "Error");
}

if (textBox1.Text != String.Empty && System.IO.File.Exists(textBox1.Text))
{
// The textbox has a filename in it, use it
mApp.Open(textBox1.Text, true, true);
}
else
{
// The user hasn't selected a config file, launch with default
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
}
}


Content validation in the cfg should be done and the user should be notified if wrong cfg is selected.










share|improve this question









New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Cfg files never contain the dbc message instance definitions, or signal definitions. cfg only stores the dbc file path necessary for compilation. So you cannot check this through cfg file alone. You need to specify the attributes you wish to consider correct in a cfg.
    – VioletVynil
    4 hours ago










  • Yes, that is correct. But currently I am not able to fetch which of the attributes I need to specify to differentiate between different configurations. Once I get that info, I can run through multiple configurations and provide a notification in-case user loads wrong cfg.
    – Pavan Kulkarni
    3 hours ago












  • You get versioning info and generation date in the first 20 lines of the cfg file if you open it by text editor. I will check after the holidays.
    – VioletVynil
    2 hours ago














0












0








0







When user is selecting a wrong CANoe cfg file for a particular variant, user should be notified of the wrong cfg file. The correctness of the cfg file should be validated against the content( for example: based on the dbc files loaded into each configuration)



Please find the below code for the current implementation:
I need to do a check based on the content probably dbc( the resp. messages and signals within the cfg) and user has to be notified on the Frontend if wrong cfg is selected.
Currently I have mentioned the respective configurations but I haven't done any content check for the configurations.



private void button2_Click(object sender, EventArgs e)                      
//Function to run/start CANoe measurement
{
// Execute CANoe(Obtain CANoe application objectg)
var mApp = new CANoe.Application();
var mMsr = (CANoe.Measurement)mApp.Measurement;
try
{
if (tcu == '1')
{
CANoe = new cCANoe1();
}
else if (tcu == '2')
{
CANoe = new cCANoe2();
}
log.WritetoFile("Opening CANoe configuration");
Console.WriteLine("Opening CANoe configuration");
// mApp.Open("C:\Users\uidr3024\Downloads\SRLCam4T0_Validation_ControlTool\cfg\SVT_SRLCam4T0_025B.cfg", true, true);
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
log.WritetoFile("Starting measurement ");
CANoe.startMeasurement(this);
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.Message);
log.WritetoFile("Exception:" + ex.Message);
MessageBox.Show("CANoe application error", "Error");
}

if (textBox1.Text != String.Empty && System.IO.File.Exists(textBox1.Text))
{
// The textbox has a filename in it, use it
mApp.Open(textBox1.Text, true, true);
}
else
{
// The user hasn't selected a config file, launch with default
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
}
}


Content validation in the cfg should be done and the user should be notified if wrong cfg is selected.










share|improve this question









New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











When user is selecting a wrong CANoe cfg file for a particular variant, user should be notified of the wrong cfg file. The correctness of the cfg file should be validated against the content( for example: based on the dbc files loaded into each configuration)



Please find the below code for the current implementation:
I need to do a check based on the content probably dbc( the resp. messages and signals within the cfg) and user has to be notified on the Frontend if wrong cfg is selected.
Currently I have mentioned the respective configurations but I haven't done any content check for the configurations.



private void button2_Click(object sender, EventArgs e)                      
//Function to run/start CANoe measurement
{
// Execute CANoe(Obtain CANoe application objectg)
var mApp = new CANoe.Application();
var mMsr = (CANoe.Measurement)mApp.Measurement;
try
{
if (tcu == '1')
{
CANoe = new cCANoe1();
}
else if (tcu == '2')
{
CANoe = new cCANoe2();
}
log.WritetoFile("Opening CANoe configuration");
Console.WriteLine("Opening CANoe configuration");
// mApp.Open("C:\Users\uidr3024\Downloads\SRLCam4T0_Validation_ControlTool\cfg\SVT_SRLCam4T0_025B.cfg", true, true);
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
log.WritetoFile("Starting measurement ");
CANoe.startMeasurement(this);
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.Message);
log.WritetoFile("Exception:" + ex.Message);
MessageBox.Show("CANoe application error", "Error");
}

if (textBox1.Text != String.Empty && System.IO.File.Exists(textBox1.Text))
{
// The textbox has a filename in it, use it
mApp.Open(textBox1.Text, true, true);
}
else
{
// The user hasn't selected a config file, launch with default
mApp.Open("C:\MMC_Project\Dheepika KT\2013_42_Multibus - Simultaneous\BR205_Multibus_2013_42_CANoe76.CFG", true, true);
}
}


Content validation in the cfg should be done and the user should be notified if wrong cfg is selected.







c# com canoe






share|improve this question









New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 4 hours ago









AS Mackay

1,8694816




1,8694816






New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









Pavan Kulkarni

11




11




New contributor




Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Pavan Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Cfg files never contain the dbc message instance definitions, or signal definitions. cfg only stores the dbc file path necessary for compilation. So you cannot check this through cfg file alone. You need to specify the attributes you wish to consider correct in a cfg.
    – VioletVynil
    4 hours ago










  • Yes, that is correct. But currently I am not able to fetch which of the attributes I need to specify to differentiate between different configurations. Once I get that info, I can run through multiple configurations and provide a notification in-case user loads wrong cfg.
    – Pavan Kulkarni
    3 hours ago












  • You get versioning info and generation date in the first 20 lines of the cfg file if you open it by text editor. I will check after the holidays.
    – VioletVynil
    2 hours ago


















  • Cfg files never contain the dbc message instance definitions, or signal definitions. cfg only stores the dbc file path necessary for compilation. So you cannot check this through cfg file alone. You need to specify the attributes you wish to consider correct in a cfg.
    – VioletVynil
    4 hours ago










  • Yes, that is correct. But currently I am not able to fetch which of the attributes I need to specify to differentiate between different configurations. Once I get that info, I can run through multiple configurations and provide a notification in-case user loads wrong cfg.
    – Pavan Kulkarni
    3 hours ago












  • You get versioning info and generation date in the first 20 lines of the cfg file if you open it by text editor. I will check after the holidays.
    – VioletVynil
    2 hours ago
















Cfg files never contain the dbc message instance definitions, or signal definitions. cfg only stores the dbc file path necessary for compilation. So you cannot check this through cfg file alone. You need to specify the attributes you wish to consider correct in a cfg.
– VioletVynil
4 hours ago




Cfg files never contain the dbc message instance definitions, or signal definitions. cfg only stores the dbc file path necessary for compilation. So you cannot check this through cfg file alone. You need to specify the attributes you wish to consider correct in a cfg.
– VioletVynil
4 hours ago












Yes, that is correct. But currently I am not able to fetch which of the attributes I need to specify to differentiate between different configurations. Once I get that info, I can run through multiple configurations and provide a notification in-case user loads wrong cfg.
– Pavan Kulkarni
3 hours ago






Yes, that is correct. But currently I am not able to fetch which of the attributes I need to specify to differentiate between different configurations. Once I get that info, I can run through multiple configurations and provide a notification in-case user loads wrong cfg.
– Pavan Kulkarni
3 hours ago














You get versioning info and generation date in the first 20 lines of the cfg file if you open it by text editor. I will check after the holidays.
– VioletVynil
2 hours ago




You get versioning info and generation date in the first 20 lines of the cfg file if you open it by text editor. I will check after the holidays.
– VioletVynil
2 hours ago

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Pavan Kulkarni is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53941470%2fchecking-correctness-of-canoe-configuration-file-chosen-and-providing-a-notifica%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Pavan Kulkarni is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Pavan Kulkarni is a new contributor. Be nice, and check out our Code of Conduct.













Pavan Kulkarni is a new contributor. Be nice, and check out our Code of Conduct.












Pavan Kulkarni is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53941470%2fchecking-correctness-of-canoe-configuration-file-chosen-and-providing-a-notifica%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mossoró

Error while reading .h5 file using the rhdf5 package in R

Pushsharp Apns notification error: 'InvalidToken'