Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
ec84cd3e
Commit
ec84cd3e
authored
16 years ago
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Name of byteordering enum changed
parent
44ef765d
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
84 deletions
+84
-84
profibus/lib/rt/src/os_linux/rt_io_m_pb_ai.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_ai.c
+4
-4
profibus/lib/rt/src/os_linux/rt_io_m_pb_ao.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_ao.c
+7
-7
profibus/lib/rt/src/os_linux/rt_io_m_pb_di.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_di.c
+2
-2
profibus/lib/rt/src/os_linux/rt_io_m_pb_do.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_do.c
+2
-2
profibus/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
+5
-5
profibus/lib/rt/src/os_linux/rt_io_m_pb_ii.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_ii.c
+7
-7
profibus/lib/rt/src/os_linux/rt_io_m_pb_io.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_io.c
+4
-4
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
+36
-36
profibus/lib/rt/src/rt_pb_gsd.cpp
profibus/lib/rt/src/rt_pb_gsd.cpp
+17
-17
No files found.
profibus/lib/rt/src/os_linux/rt_io_m_pb_ai.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_ai.c,v 1.
5 2007-01-17 12:40:30
claes Exp $
* Proview $Id: rt_io_m_pb_ai.c,v 1.
6 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -275,7 +275,7 @@ static pwr_tStatus IoCardRead (
if
(
op
->
BytesPerChannel
==
4
)
{
memcpy
(
&
udata32
,
local
->
input_area
+
op
->
OffsetInputs
+
4
*
i
,
4
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata32
=
swap32
(
udata32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata32
=
swap32
(
udata32
);
data32
=
(
pwr_tInt32
)
udata32
;
sop
->
RawValue
=
0
;
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
...
...
@@ -294,7 +294,7 @@ static pwr_tStatus IoCardRead (
else
if
(
op
->
BytesPerChannel
==
3
)
{
udata32
=
0
;
memcpy
(
&
udata32
,
local
->
input_area
+
op
->
OffsetInputs
+
3
*
i
,
3
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
{
udata32
=
swap32
(
udata32
);
udata32
=
udata32
>>
8
;
}
...
...
@@ -315,7 +315,7 @@ static pwr_tStatus IoCardRead (
}
else
if
(
op
->
BytesPerChannel
==
2
)
{
memcpy
(
&
udata16
,
local
->
input_area
+
op
->
OffsetInputs
+
2
*
i
,
2
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata16
=
swap16
(
udata16
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata16
=
swap16
(
udata16
);
data16
=
(
pwr_tInt16
)
udata16
;
sop
->
RawValue
=
udata16
;
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_ao.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_ao.c,v 1.
5 2007-01-12 13:28:31
claes Exp $
* Proview $Id: rt_io_m_pb_ao.c,v 1.
6 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -166,12 +166,12 @@ static pwr_tStatus IoCardWrite (
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
{
udata32
=
(
pwr_tUInt32
)
rawvalue
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata32
=
swap32
(
udata32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata32
=
swap32
(
udata32
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
4
*
i
,
&
udata32
,
4
);
}
else
if
(
op
->
NumberRepresentation
==
PB_NUMREP_SIGNEDINT
)
{
data32
=
(
pwr_tInt32
)
rawvalue
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data32
=
swap32
(
data32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data32
=
swap32
(
data32
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
4
*
i
,
&
data32
,
4
);
}
...
...
@@ -180,12 +180,12 @@ static pwr_tStatus IoCardWrite (
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
{
udata32
=
(
pwr_tUInt32
)
rawvalue
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata32
=
swap32
(
udata32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata32
=
swap32
(
udata32
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
3
*
i
,
&
udata32
,
3
);
}
else
if
(
op
->
NumberRepresentation
==
PB_NUMREP_SIGNEDINT
)
{
data32
=
(
pwr_tInt32
)
rawvalue
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data32
=
swap32
(
data32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data32
=
swap32
(
data32
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
3
*
i
,
&
data32
,
3
);
}
...
...
@@ -194,12 +194,12 @@ static pwr_tStatus IoCardWrite (
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
{
udata16
=
(
pwr_tUInt16
)
rawvalue
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata16
=
swap16
(
udata16
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata16
=
swap16
(
udata16
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
2
*
i
,
&
udata16
,
2
);
}
else
if
(
op
->
NumberRepresentation
==
PB_NUMREP_SIGNEDINT
)
{
data16
=
(
pwr_tInt16
)
rawvalue
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data16
=
swap16
(
data16
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data16
=
swap16
(
data16
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
2
*
i
,
&
data16
,
2
);
}
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_di.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_di.c,v 1.
5 2007-01-12 13:28:31
claes Exp $
* Proview $Id: rt_io_m_pb_di.c,v 1.
6 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -232,7 +232,7 @@ static pwr_tStatus IoCardRead (
memcpy
(
&
data
,
local
->
input_area
+
op
->
OffsetInputs
,
op
->
BytesOfInput
);
data32
=
(
pwr_tUInt32
*
)
&
data
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
{
if
(
op
->
Orientation
==
PB_ORIENTATION_WORD
)
{
data
[
0
]
=
swap16
(
data
[
0
]);
data
[
1
]
=
swap16
(
data
[
1
]);
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_do.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_do.c,v 1.
5 2007-01-12 13:28:31
claes Exp $
* Proview $Id: rt_io_m_pb_do.c,v 1.
6 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -125,7 +125,7 @@ static pwr_tStatus IoCardWrite (
io_DoPackWord(cp, &data[0], 0);
if (op->NumberOfChannels > 16) io_DoPackWord(cp, &data[1], 1);
*/
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
{
if
(
op
->
Orientation
==
PB_ORIENTATION_WORD
)
{
data
[
0
]
=
swap16
(
data
[
0
]);
data
[
1
]
=
swap16
(
data
[
1
]);
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_dp_slave.c,v 1.1
0 2007-11-23 10:07:10
claes Exp $
* Proview $Id: rt_io_m_pb_dp_slave.c,v 1.1
1 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -264,9 +264,9 @@ static pwr_tStatus IoRackInit (
}
chanp
->
offset
=
input_counter
;
chanp
->
mask
=
1
<<
chan_di
->
Number
;
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
chanp
->
mask
=
swap16
(
chanp
->
mask
);
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
chanp
->
mask
=
swap32
((
unsigned
short
)
chanp
->
mask
);
if
(
chan_di
->
Number
==
0
)
latent_input_count
=
GetChanSize
(
chan_di
->
Representation
);
// printf("Di channel found in %s, Number %d, Offset %d\n", cardp->Name, chan_di->Number, chanp->offset);
...
...
@@ -312,9 +312,9 @@ static pwr_tStatus IoRackInit (
chanp
->
offset
=
output_counter
;
chan_size
=
GetChanSize
(
chan_do
->
Representation
);
chanp
->
mask
=
1
<<
chan_do
->
Number
;
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
&&
op
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
chanp
->
mask
=
swap16
(
chanp
->
mask
);
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit32
&&
op
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
chanp
->
mask
=
swap32
((
unsigned
short
)
chanp
->
mask
);
if
(
chan_do
->
Number
==
0
)
latent_output_count
=
GetChanSize
(
chan_do
->
Representation
);
// printf("Do channel found in %s, Number %d, Offset %d\n", cardp->Name, chan_do->Number, chanp->offset);
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_ii.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_ii.c,v 1.
5 2007-01-12 13:28:31
claes Exp $
* Proview $Id: rt_io_m_pb_ii.c,v 1.
6 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -119,12 +119,12 @@ static pwr_tStatus IoCardRead (
if
(
op
->
BytesPerChannel
==
4
)
{
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
{
memcpy
(
&
udata32
,
local
->
input_area
+
op
->
OffsetInputs
+
4
*
i
,
4
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata32
=
swap32
(
udata32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata32
=
swap32
(
udata32
);
*
(
pwr_tInt32
*
)
chanp
->
vbp
=
(
pwr_tInt32
)
udata32
;
}
else
if
(
op
->
NumberRepresentation
==
PB_NUMREP_SIGNEDINT
)
{
memcpy
(
&
data32
,
local
->
input_area
+
op
->
OffsetInputs
+
4
*
i
,
4
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data32
=
swap32
(
data32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data32
=
swap32
(
data32
);
*
(
pwr_tInt32
*
)
chanp
->
vbp
=
data32
;
}
}
...
...
@@ -132,7 +132,7 @@ static pwr_tStatus IoCardRead (
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
{
udata32
=
0
;
memcpy
(
&
udata32
,
local
->
input_area
+
op
->
OffsetInputs
+
3
*
i
,
3
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
{
udata32
=
swap32
(
udata32
);
udata32
=
udata32
>>
8
;
}
...
...
@@ -141,7 +141,7 @@ static pwr_tStatus IoCardRead (
else
if
(
op
->
NumberRepresentation
==
PB_NUMREP_SIGNEDINT
)
{
data32
=
0
;
memcpy
(
&
data32
,
local
->
input_area
+
op
->
OffsetInputs
+
3
*
i
,
3
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
{
data32
=
swap32
(
data32
);
data32
=
data32
>>
8
;
}
...
...
@@ -151,12 +151,12 @@ static pwr_tStatus IoCardRead (
else
if
(
op
->
BytesPerChannel
==
2
)
{
if
(
op
->
NumberRepresentation
==
PB_NUMREP_UNSIGNEDINT
)
{
memcpy
(
&
udata16
,
local
->
input_area
+
op
->
OffsetInputs
+
2
*
i
,
2
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
udata16
=
swap16
(
udata16
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
udata16
=
swap16
(
udata16
);
*
(
pwr_tInt32
*
)
chanp
->
vbp
=
(
pwr_tInt32
)
udata16
;
}
else
if
(
op
->
NumberRepresentation
==
PB_NUMREP_SIGNEDINT
)
{
memcpy
(
&
data16
,
local
->
input_area
+
op
->
OffsetInputs
+
2
*
i
,
2
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data16
=
swap16
(
data16
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data16
=
swap16
(
data16
);
*
(
pwr_tInt32
*
)
chanp
->
vbp
=
(
pwr_tInt32
)
data16
;
}
}
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_io.c
View file @
ec84cd3e
/*
* Proview $Id: rt_io_m_pb_io.c,v 1.
5 2007-01-12 13:28:31
claes Exp $
* Proview $Id: rt_io_m_pb_io.c,v 1.
6 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -115,16 +115,16 @@ static pwr_tStatus IoCardWrite (
data32
=
*
(
pwr_tInt32
*
)
chanp
->
vbp
;
if
(
op
->
BytesPerChannel
==
4
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data32
=
swap32
(
data32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data32
=
swap32
(
data32
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
4
*
i
,
&
data32
,
4
);
}
else
if
(
op
->
BytesPerChannel
==
3
)
{
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data32
=
swap32
(
data32
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data32
=
swap32
(
data32
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
3
*
i
,
&
data32
,
3
);
}
else
if
(
op
->
BytesPerChannel
==
2
)
{
data16
=
(
pwr_tInt16
)
data32
;
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering_BigEndian
)
data16
=
swap16
(
data16
);
if
(
slave
->
ByteOrdering
==
pwr_eByteOrdering
Enum
_BigEndian
)
data16
=
swap16
(
data16
);
memcpy
(
local
->
output_area
+
op
->
OffsetOutputs
+
2
*
i
,
&
data16
,
2
);
}
else
if
(
op
->
BytesPerChannel
==
1
)
{
...
...
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
View file @
ec84cd3e
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/rt_pb_gsd.cpp
View file @
ec84cd3e
/*
* Proview $Id: rt_pb_gsd.cpp,v 1.1
1 2007-11-16 07:52:54
claes Exp $
* Proview $Id: rt_pb_gsd.cpp,v 1.1
2 2008-02-05 08:14:59
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1254,7 +1254,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
unsigned
short
v
=
(
unsigned
short
)
item
[
i
].
value
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1263,7 +1263,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
data
[
item
[
i
].
ref
->
Reference_Offset
+
1
]
=
b
[
0
];
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1282,7 +1282,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
short
v
=
(
short
)
item
[
i
].
value
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1291,7 +1291,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
data
[
item
[
i
].
ref
->
Reference_Offset
+
1
]
=
b
[
0
];
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1310,7 +1310,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
unsigned
int
v
=
(
unsigned
int
)
item
[
i
].
value
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1321,7 +1321,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
data
[
item
[
i
].
ref
->
Reference_Offset
+
3
]
=
b
[
0
];
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1342,7 +1342,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
int
v
=
(
int
)
item
[
i
].
value
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1353,7 +1353,7 @@ int pb_gsd::prm_items_to_data( gsd_sPrmDataItem *item, int item_size,
data
[
item
[
i
].
ref
->
Reference_Offset
+
3
]
=
b
[
0
];
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
&
v
,
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1422,7 +1422,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
case
gsd_Unsigned16
:
{
unsigned
short
v
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1431,7 +1431,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
memcpy
(
&
v
,
b
,
sizeof
(
v
));
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1446,7 +1446,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
case
gsd_Signed16
:
{
short
v
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1455,7 +1455,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
memcpy
(
&
v
,
b
,
sizeof
(
v
));
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
2
];
...
...
@@ -1470,7 +1470,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
case
gsd_Unsigned32
:
{
unsigned
int
v
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1481,7 +1481,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
memcpy
(
&
v
,
b
,
sizeof
(
v
));
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1498,7 +1498,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
case
gsd_Signed32
:
{
int
v
;
#if (pwr_dHost_byteOrder == pwr_dLittleEndian)
if
(
byte_order
==
pwr_eByteOrdering_LittleEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_LittleEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
@@ -1509,7 +1509,7 @@ int pb_gsd::prm_data_to_items( gsd_sPrmDataItem *item, int item_size,
memcpy
(
&
v
,
b
,
sizeof
(
v
));
}
#elif (pwr_dHost_byteOrder == pwr_dBigEndian)
if
(
byte_order
==
pwr_eByteOrdering_BigEndian
)
if
(
byte_order
==
pwr_eByteOrdering
Enum
_BigEndian
)
memcpy
(
&
v
,
&
data
[
item
[
i
].
ref
->
Reference_Offset
],
sizeof
(
v
));
else
{
unsigned
char
b
[
4
];
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment