CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Nov 19, 2018 10:02 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jan 08, 2018 12:51 pm 
Online

Joined: Wed Mar 01, 2017 3:07 pm
Posts: 7
Hi,

I would like to know how to update the device version to the latest one without providing the latest device version. :D

An example would be great.

The update(...) method requires the device version.


Top
   
PostPosted: Mon Jan 08, 2018 4:05 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 232
Hi chenhe.

chenhe wrote:
I would like to know how to update the device version to the latest one without providing the latest device version.

Sorry, but there is no easy way to do that because the version is stored as string which allows to store more than just a simple version info. Some vendors store additional informations like the version number of the hardware which makes the comparison difficult.

We use a two steps to compare the versions. First try to parse the string as System.Version (.Net). If it was successful we compare the System.Version objects. If not, we simply compare the strings.

If a vendor use the same version format for all its devices you can create your own compare algorithm for it.

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited