Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Development tools

Development tools 1 year 8 months ago #10969

  • davew
  • davew's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
Is there a reference somewhere to tools used to develop for proviewR?

I'm trying to update / fix / get the libnodave interface working and bring it into line with the other such components like modbus TCP.

I've found that erro texts seem to be configured via a .msg file like src/msg/rt/src/rt_mb_msg.msg
That file looks like its generated by a specific tool but I can't find a reference to such tools anywhere. If its not done by a tool is there a document that explains the format of such files?
The administrator has disabled public write access.

Development tools 1 year 8 months ago #10970

  • davew
  • davew's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
Theres also this file.
otherio/inc/pwr_otherioclasses.h

Its only in the build tree and is generated (or so it says) by co_convert.

What I can't work out is what co_convert uses to generate this file.

I need to change some types and I will need to create some new classes etc in there (when I write a Mitsubishi TCP driver) but I can not for the life of me determine where co_convert gets its information to generate this file.

More specifically:

I want to change this
typedef struct {
  pwr_tString80                       Description pwr_dAlignLW;
  pwr_tString80                       Status pwr_dAlignW;
  pwr_tIoProcessMask                  Process pwr_dAlignW;
  pwr_tObjid                          ThreadObject pwr_dAlignW;
  pwr_tNodave_ConnectionEnum          Connection pwr_dAlignW;
  pwr_tString40                       SerialDevice pwr_dAlignW;
  pwr_tUInt32                         SerialSpeed pwr_dAlignW;
  pwr_tParityEnum                     SerialParity pwr_dAlignW;
  pwr_tUInt32                         Port pwr_dAlignW;
  pwr_tString40                       IP_Address pwr_dAlignW;
  pwr_tNodave_ProtocolEnum            Protocol pwr_dAlignW;
  pwr_tNodave_SpeedEnum               Speed pwr_dAlignW;
  pwr_tInt32                          MPI_Address pwr_dAlignW;
  pwr_tInt32                          MPI_Local pwr_dAlignW;
  pwr_tInt32                          Rack pwr_dAlignW;
  pwr_tInt32                          Slot pwr_dAlignW;
  pwr_tByteOrderingEnum               ByteOrdering pwr_dAlignW;
  pwr_tFloatRepEnum                   FloatRepresentation pwr_dAlignW;
  pwr_tFloat32                        Timeout pwr_dAlignW;
  pwr_tStallActionEnum                StallAction pwr_dAlignW;
  pwr_tUInt32                         ErrorCount pwr_dAlignW;
  pwr_tUInt32                         ErrorLimit pwr_dAlignW;
  pwr_tUInt32                         Debug pwr_dAlignW;
  pwr_tUInt8                          Inputs[200] pwr_dAlignW;
  pwr_tUInt8                          Outputs[200] pwr_dAlignW;
} pwr_sClass_Nodave_PLC;

to be this:
typedef struct {
  pwr_tString80                       Description pwr_dAlignLW;
  pwr_tStatus                       Status pwr_dAlignW;
  pwr_tIoProcessMask                  Process pwr_dAlignW;
  pwr_tObjid                          ThreadObject pwr_dAlignW;
  pwr_tNodave_ConnectionEnum          Connection pwr_dAlignW;
  pwr_tString40                       SerialDevice pwr_dAlignW;
  pwr_tUInt32                         SerialSpeed pwr_dAlignW;
  pwr_tParityEnum                     SerialParity pwr_dAlignW;
  pwr_tUInt32                         Port pwr_dAlignW;
  pwr_tString40                       IP_Address pwr_dAlignW;
  pwr_tNodave_ProtocolEnum            Protocol pwr_dAlignW;
  pwr_tNodave_SpeedEnum               Speed pwr_dAlignW;
  pwr_tInt32                          MPI_Address pwr_dAlignW;
  pwr_tInt32                          MPI_Local pwr_dAlignW;
  pwr_tInt32                          Rack pwr_dAlignW;
  pwr_tInt32                          Slot pwr_dAlignW;
  pwr_tByteOrderingEnum               ByteOrdering pwr_dAlignW;
  pwr_tFloatRepEnum                   FloatRepresentation pwr_dAlignW;
  pwr_tFloat32                        Timeout pwr_dAlignW;
  pwr_tStallActionEnum                StallAction pwr_dAlignW;
  pwr_tUInt32                         ErrorCount pwr_dAlignW;
  pwr_tUInt32                         ErrorLimit pwr_dAlignW;
  pwr_tUInt32                         Debug pwr_dAlignW;
  pwr_tUInt8                          Inputs[200] pwr_dAlignW;
  pwr_tUInt8                          Outputs[200] pwr_dAlignW;
} pwr_sClass_Nodave_PLC;
(only the second entry changed)
Like it is in pwr_sClass_Modbus_TCP_Slave
Last Edit: 1 year 8 months ago by davew.
The administrator has disabled public write access.

Development tools 1 year 8 months ago #10972

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3048
  • Thank you received: 454
  • Karma: 125
Dave,

What we have is the Developer's Guide on the Development page.

The conversion are performed by make and you can see them in the makefiles, either on the source directories or in src/tools/bld/src, eg msg_generic.mk, wbl_generic.mk and rules.mk.

The way to build a modification in a message file in src/msg/rt/src is

pwre module
pwre build msg rt src
pwre merge

The modification of the status attribute is a bit more advanced because here you want to modify a class. The source for classes are wb_load-files and in this case otherio/wbl/mcomp/src/otherio.wb_load. It's normally edited with the class editor that is started with

pwre module otherio
cd $pwre_sroot/wbl/mcomp/src
wblstart.sh otherio.wb_load

Now you can change TypeRef for the Status attribute from $String80 to $Status.

New includefiles are built with

pwre build wbl mcomp src copy
pwre merge

From the wb_load file you also have to generate dbs-files that contains object definitions. There will be one dbs-file for each class volume, and as they have internal dependencies, the best way is to regenerate all dbs-files with

pwre build_all_wbl

Then you also have to update your projects with the new class. Enter the root volume and activate Functions/Update Classes. This will load new dbs-files and convert any instances of modified classes.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: AutoMate, davew

Development tools 1 year 8 months ago #10973

  • davew
  • davew's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
Claes,
Brilliant.
That is exactly the information I needed to get my head round this source tree development.

To clarify.
msg files are created and editted by hand (standard text editor) and update used_facility_numbers.txt accordingly.
Is used_facility_numbers.txt used in the build or is it for developer reference only?

It seems as though this was intended to be covered in the "Guide to I/O System". It says it provides two examples , one by adding to the project and the other by adding to the source tree but it ends without the example for adding to the source tree.

I have a question regarding submitting patches but I'll ask that in another thread.

Thank you very much for all the help.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 1.408 seconds