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
37dcaf5f
Commit
37dcaf5f
authored
Mar 09, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of claes@pwrcvs:/data1/git/pwr
parents
673d3b61
b3e851ab
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
421 additions
and
126 deletions
+421
-126
otherio/exp/rt/src/pwr_arduino_uno.pde
otherio/exp/rt/src/pwr_arduino_uno.pde
+51
-2
otherio/lib/rt/src/rt_io_m_arduino_uno.c
otherio/lib/rt/src/rt_io_m_arduino_uno.c
+212
-61
remote/exe/rs_remote_wmq/src/rs_remote_wmq.c
remote/exe/rs_remote_wmq/src/rs_remote_wmq.c
+79
-39
src/tools/pkg/deb/pwr/control
src/tools/pkg/deb/pwr/control
+12
-1
src/tools/pkg/deb/pwrdemo/control
src/tools/pkg/deb/pwrdemo/control
+2
-2
src/tools/pkg/deb/pwrrt/control
src/tools/pkg/deb/pwrrt/control
+5
-1
src/tools/pkg/deb/pwrsev/control
src/tools/pkg/deb/pwrsev/control
+1
-1
src/tools/pkg/ubu/pwr/control
src/tools/pkg/ubu/pwr/control
+12
-1
src/tools/pkg/ubu/pwrdemo/control
src/tools/pkg/ubu/pwrdemo/control
+2
-2
src/tools/pkg/ubu/pwrrt/control
src/tools/pkg/ubu/pwrrt/control
+5
-1
src/tools/pkg/ubu/pwrsev/control
src/tools/pkg/ubu/pwrsev/control
+1
-1
src/tools/pkg/ubu_x86_64/pwr/control
src/tools/pkg/ubu_x86_64/pwr/control
+21
-5
src/tools/pkg/ubu_x86_64/pwrdemo/control
src/tools/pkg/ubu_x86_64/pwrdemo/control
+4
-4
src/tools/pkg/ubu_x86_64/pwrrt/control
src/tools/pkg/ubu_x86_64/pwrrt/control
+11
-2
src/tools/pkg/ubu_x86_64/pwrsev/control
src/tools/pkg/ubu_x86_64/pwrsev/control
+2
-2
xtt/lib/xtt/motif/xtt_xattone_motif.cpp
xtt/lib/xtt/motif/xtt_xattone_motif.cpp
+1
-1
No files found.
otherio/exp/rt/src/pwr_arduino_uno.pde
View file @
37dcaf5f
...
...
@@ -51,13 +51,15 @@ int noMessageCnt = 0;
const
int
delayTime
=
1
;
const
int
debug
=
0
;
const
int
MSG_TYPE_WRITE
=
1
;
const
int
MSG_TYPE_
DO
WRITE
=
1
;
const
int
MSG_TYPE_DIREAD
=
2
;
const
int
MSG_TYPE_AIREAD
=
3
;
const
int
MSG_TYPE_AOWRITE
=
4
;
const
int
MSG_TYPE_CONFIGURE
=
5
;
const
int
MSG_TYPE_STATUS
=
6
;
const
int
MSG_TYPE_DEBUG
=
7
;
const
int
MSG_TYPE_WRITEALL
=
8
;
const
int
MSG_TYPE_READALL
=
9
;
const
int
ARD__SUCCESS
=
1
;
const
int
ARD__DICONFIG
=
2
;
...
...
@@ -159,7 +161,7 @@ void loop()
sizeErrorCnt
=
0
;
noMessageCnt
=
0
;
if
(
msgType
==
MSG_TYPE_WRITE
)
{
if
(
msgType
==
MSG_TYPE_
DO
WRITE
)
{
// Write digital outputs
if
(
msgSize
==
doSize
)
{
...
...
@@ -192,6 +194,30 @@ void loop()
sts
=
ARD__COMMERROR
;
}
}
else
if
(
msgType
==
MSG_TYPE_WRITEALL
)
{
// Write digital outputs
if
(
msgSize
==
doSize
+
aoCnt
)
{
for
(
i
=
0
;
i
<
doSize
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
if
(
((
1
<<
j
)
&
doMask
[
i
])
!=
0
)
{
if
(
((
1
<<
j
)
&
msgData
[
i
])
!=
0
)
digitalWrite
(
i
*
8
+
j
,
HIGH
);
else
digitalWrite
(
i
*
8
+
j
,
LOW
);
}
}
}
for
(
i
=
0
;
i
<
aoCnt
;
i
++
)
analogWrite
(
aoList
[
i
],
msgData
[
doSize
+
i
]);
sts
=
ARD__SUCCESS
;
}
else
{
sts
=
ARD__COMMERROR
;
}
}
else
if
(
msgType
==
MSG_TYPE_DIREAD
)
{
// Read Digital inputs
smsg
[
0
]
=
diSize
+
3
;
...
...
@@ -221,6 +247,29 @@ void loop()
}
Serial
.
write
(
amsg
,
amsg
[
0
]);
}
else
if
(
msgType
==
MSG_TYPE_READALL
)
{
// Read Digital inputs
amsg
[
0
]
=
diSize
+
aiCnt
*
2
+
3
;
amsg
[
1
]
=
msgId
;
amsg
[
2
]
=
MSG_TYPE_READALL
;
for
(
i
=
0
;
i
<
diSize
;
i
++
)
{
amsg
[
i
+
3
]
=
0
;
for
(
j
=
0
;
j
<
8
;
j
++
)
{
if
(
((
1
<<
j
)
&
diMask
[
i
])
!=
0
)
{
val
=
digitalRead
(
i
*
8
+
j
);
if
(
val
==
HIGH
)
amsg
[
i
+
3
]
|=
1
<<
j
;
}
}
}
for
(
i
=
0
;
i
<
aiCnt
;
i
++
)
{
val
=
analogRead
(
aiList
[
i
]);
amsg
[
diSize
+
i
*
2
+
3
]
=
val
/
256
;
amsg
[
diSize
+
i
*
2
+
1
+
3
]
=
val
%
256
;
}
Serial
.
write
(
amsg
,
amsg
[
0
]);
}
else
if
(
msgType
==
MSG_TYPE_CONFIGURE
)
{
// Configure message
int
offs
=
0
;
...
...
otherio/lib/rt/src/rt_io_m_arduino_uno.c
View file @
37dcaf5f
...
...
@@ -34,6 +34,19 @@
#define AI_MAX_SIZE 4
#define AO_MAX_SIZE 4
typedef
enum
{
ard_eMsgType_No
=
0
,
ard_eMsgType_DoWrite
=
1
,
ard_eMsgType_DiRead
=
2
,
ard_eMsgType_AiRead
=
3
,
ard_eMsgType_AoWrite
=
4
,
ard_eMsgType_Configure
=
5
,
ard_eMsgType_Status
=
6
,
ard_eMsgType_Debug
=
7
,
ard_eMsgType_WriteAll
=
8
,
ard_eMsgType_ReadAll
=
9
}
ard_eMsgType
;
typedef
struct
{
pwr_tTime
ErrTime
;
int
fd
;
...
...
@@ -50,6 +63,7 @@ typedef struct {
int
IdCnt
;
int
DiPollId
;
int
DiPendingPoll
;
ard_eMsgType
PendingMsgType
;
int
AiIntervalCnt
;
int
AoIntervalCnt
;
io_sChannel
*
DChanList
[
D_MAX_SIZE
*
8
];
...
...
@@ -83,16 +97,6 @@ static void logg( const char *str)
}
#endif
typedef
enum
{
ard_eMsgType_Write
=
1
,
ard_eMsgType_DiRead
=
2
,
ard_eMsgType_AiRead
=
3
,
ard_eMsgType_AoWrite
=
4
,
ard_eMsgType_Configure
=
5
,
ard_eMsgType_Status
=
6
,
ard_eMsgType_Debug
=
7
}
ard_eMsgType
;
#define ARD__SUCCESS 1
#define ARD__DICONFIG 2
#define ARD__DOCONFIG 4
...
...
@@ -153,18 +157,23 @@ static int receive( int fd, int id, ard_sMsg *rmsg, int size)
return
ARD__NOMSG
;
}
static
int
poll
_di
(
ard_sMsg
*
msg
,
io_sLocal
*
local
)
static
int
poll
(
ard_sMsg
*
msg
,
io_sLocal
*
local
,
ard_eMsgType
mtype
)
{
int
sts
;
local
->
PendingMsgType
=
mtype
;
if
(
mtype
==
ard_eMsgType_No
)
return
1
;
msg
->
size
=
3
;
msg
->
id
=
local
->
IdCnt
++
;
msg
->
type
=
ard_eMsgType_DiRead
;
msg
->
type
=
mtype
;
// logg( "Poll Di");
sts
=
write
(
local
->
fd
,
msg
,
msg
->
size
);
local
->
DiPollId
=
msg
->
id
;
local
->
DiPendingPoll
=
1
;
local
->
PendingMsgType
=
mtype
;
return
sts
;
}
...
...
@@ -437,29 +446,52 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
unsigned
int
m
;
pwr_tUInt32
error_count
=
op
->
ErrorCount
;
int
sts
;
int
skip_ai
;
ard_eMsgType
mtype
;
ard_sMsg
msg
;
if
(
local
->
DiSize
)
{
ard_sMsg
msg
,
rmsg
;
int
sts
;
int
i
,
j
;
unsigned
char
m
;
if
(
local
->
AiSize
)
{
skip_ai
=
0
;
if
(
op
->
AiScanInterval
>
1
)
{
skip_ai
=
local
->
AiIntervalCnt
;
if
(
!
local
->
DiPendingPoll
)
poll_di
(
&
msg
,
local
);
local
->
AiIntervalCnt
++
;
if
(
local
->
AiIntervalCnt
>=
op
->
AiScanInterval
)
local
->
AiIntervalCnt
=
0
;
}
}
else
skip_ai
=
1
;
#if 0
msg.size = 3;
msg.id = local->IdCnt++;
msg.type = ard_eMsgType_DiRead;
if
(
local
->
DiSize
&&
skip_ai
)
mtype
=
ard_eMsgType_DiRead
;
else
if
(
local
->
DiSize
&&
!
skip_ai
)
mtype
=
ard_eMsgType_ReadAll
;
else
if
(
!
skip_ai
)
mtype
=
ard_eMsgType_AiRead
;
else
mtype
=
ard_eMsgType_No
;
// logg( "Poll Di");
sts = write( local->fd, &msg, msg.size);
#endif
if
(
!
local
->
DiPendingPoll
)
poll
(
&
msg
,
local
,
mtype
);
else
mtype
=
local
->
PendingMsgType
;
local
->
DiPendingPoll
=
0
;
sts
=
receive
(
local
->
fd
,
local
->
DiPollId
,
&
rmsg
,
local
->
DiSize
);
if
(
mtype
==
ard_eMsgType_ReadAll
)
{
// Both Ai and Di
ard_sMsg
rmsg
;
int
sts
;
int
i
,
j
;
unsigned
char
m
;
pwr_tInt32
ivalue
;
pwr_tFloat32
actvalue
;
sts
=
receive
(
local
->
fd
,
local
->
DiPollId
,
&
rmsg
,
local
->
DiSize
+
local
->
AiNum
*
2
);
op
->
Status
=
sts
;
if
(
EVEN
(
sts
))
{
op
->
ErrorCount
++
;
...
...
@@ -475,31 +507,74 @@ static pwr_tStatus IoCardRead( io_tCtx ctx,
}
}
}
int
ai_cnt
=
0
;
for
(
i
=
0
;
i
<
local
->
AiSize
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
m
=
1
<<
j
;
if
(
local
->
AiMask
[
i
]
&
m
)
{
io_sChannel
*
chanp
=
local
->
AiChanList
[
i
*
8
+
j
];
pwr_sClass_ChanAi
*
cop
=
(
pwr_sClass_ChanAi
*
)
chanp
->
cop
;
pwr_sClass_Ai
*
sop
=
(
pwr_sClass_Ai
*
)
chanp
->
sop
;
if
(
cop
->
CalculateNewCoef
)
// Request to calculate new coefficients
io_AiRangeToCoef
(
chanp
);
ivalue
=
rmsg
.
data
[
local
->
DiSize
+
ai_cnt
*
2
]
*
256
+
rmsg
.
data
[
local
->
DiSize
+
ai_cnt
*
2
+
1
];
io_ConvertAi
(
cop
,
ivalue
,
&
actvalue
);
// Filter
if
(
sop
->
FilterType
==
1
&&
sop
->
FilterAttribute
[
0
]
>
0
&&
sop
->
FilterAttribute
[
0
]
>
ctx
->
ScanTime
)
{
actvalue
=
*
(
pwr_tFloat32
*
)
chanp
->
vbp
+
ctx
->
ScanTime
/
sop
->
FilterAttribute
[
0
]
*
(
actvalue
-
*
(
pwr_tFloat32
*
)
chanp
->
vbp
);
}
if
(
local
->
AiSize
)
{
int
skip_ai
=
0
;
*
(
pwr_tFloat32
*
)
chanp
->
vbp
=
actvalue
;
sop
->
SigValue
=
cop
->
SigValPolyCoef1
*
ivalue
+
cop
->
SigValPolyCoef0
;
sop
->
RawValue
=
ivalue
;
ai_cnt
++
;
}
}
}
}
else
if
(
mtype
==
ard_eMsgType_DiRead
)
{
// Only Di, no Ai
if
(
op
->
AiScanInterval
>
1
)
{
skip_ai
=
local
->
AiIntervalCnt
;
ard_sMsg
rmsg
;
int
sts
;
int
i
,
j
;
unsigned
char
m
;
local
->
AiIntervalCnt
++
;
if
(
local
->
AiIntervalCnt
>=
op
->
AiScanInterval
)
local
->
AiIntervalCnt
=
0
;
sts
=
receive
(
local
->
fd
,
local
->
DiPollId
,
&
rmsg
,
local
->
DiSize
);
op
->
Status
=
sts
;
if
(
EVEN
(
sts
))
{
op
->
ErrorCount
++
;
}
else
{
// printf( "Read: %u %u (%d)\n", rmsg.data[0], rmsg.data[1], sts);
for
(
i
=
0
;
i
<
local
->
DiSize
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
m
=
1
<<
j
;
if
(
local
->
DiMask
[
i
]
&
m
)
*
(
pwr_tBoolean
*
)
local
->
DChanList
[
i
*
8
+
j
]
->
vbp
=
((
rmsg
.
data
[
i
]
&
m
)
!=
0
);
}
}
}
}
else
if
(
mtype
==
ard_eMsgType_AiRead
)
{
// Only Ai, no Di
if
(
!
skip_ai
)
{
ard_sMsg
msg
,
rmsg
;
ard_sMsg
rmsg
;
pwr_tInt32
ivalue
;
pwr_tFloat32
actvalue
;
msg
.
size
=
3
;
msg
.
id
=
local
->
IdCnt
++
;
msg
.
type
=
ard_eMsgType_AiRead
;
sts
=
write
(
local
->
fd
,
&
msg
,
msg
.
size
);
sts
=
receive
(
local
->
fd
,
msg
.
id
,
&
rmsg
,
local
->
AiNum
*
2
);
sts
=
receive
(
local
->
fd
,
local
->
DiPollId
,
&
rmsg
,
local
->
AiNum
*
2
);
if
(
EVEN
(
sts
))
{
}
else
{
...
...
@@ -563,13 +638,28 @@ static pwr_tStatus IoCardWrite( io_tCtx ctx,
pwr_tUInt32
error_count
=
op
->
ErrorCount
;
ard_sMsg
msg
;
int
sts
;
int
skip_ao
;
if
(
local
->
AoSize
)
{
skip_ao
=
0
;
if
(
op
->
AoScanInterval
>
1
)
{
skip_ao
=
local
->
AoIntervalCnt
;
local
->
AoIntervalCnt
++
;
if
(
local
->
AoIntervalCnt
>=
op
->
AoScanInterval
)
local
->
AoIntervalCnt
=
0
;
}
}
else
skip_ao
=
1
;
if
(
local
->
DoSize
)
{
if
(
local
->
DoSize
&&
skip_ao
)
{
memset
(
&
msg
,
0
,
sizeof
(
msg
));
msg
.
size
=
local
->
DoSize
+
3
;
msg
.
id
=
local
->
IdCnt
++
;
msg
.
type
=
ard_eMsgType_Write
;
msg
.
type
=
ard_eMsgType_
Do
Write
;
for
(
i
=
0
;
i
<
local
->
DoSize
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
...
...
@@ -585,17 +675,7 @@ static pwr_tStatus IoCardWrite( io_tCtx ctx,
// logg( "Write Do");
sts
=
write
(
local
->
fd
,
&
msg
,
msg
.
size
);
}
if
(
local
->
AoSize
)
{
int
skip_ao
=
0
;
if
(
op
->
AoScanInterval
>
1
)
{
skip_ao
=
local
->
AoIntervalCnt
;
local
->
AoIntervalCnt
++
;
if
(
local
->
AoIntervalCnt
>=
op
->
AoScanInterval
)
local
->
AoIntervalCnt
=
0
;
}
else
if
(
local
->
AoSize
&&
!
local
->
DoSize
)
{
if
(
!
skip_ao
)
{
ard_sMsg
msg
;
...
...
@@ -639,6 +719,58 @@ static pwr_tStatus IoCardWrite( io_tCtx ctx,
// logg( "Write Ao");
sts
=
write
(
local
->
fd
,
&
msg
,
msg
.
size
);
}
}
else
if
(
local
->
DoSize
&&
!
skip_ao
)
{
memset
(
&
msg
,
0
,
sizeof
(
msg
));
msg
.
size
=
local
->
DoSize
+
local
->
AoNum
+
3
;
msg
.
id
=
local
->
IdCnt
++
;
msg
.
type
=
ard_eMsgType_WriteAll
;
for
(
i
=
0
;
i
<
local
->
DoSize
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
m
=
1
<<
j
;
if
(
local
->
DoMask
[
i
]
&
m
)
{
if
(
*
(
pwr_tBoolean
*
)
local
->
DChanList
[
i
*
8
+
j
]
->
vbp
)
msg
.
data
[
i
]
|=
m
;
}
}
}
int
value
;
int
ao_cnt
=
0
;
for
(
i
=
0
;
i
<
local
->
AoSize
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
m
=
1
<<
j
;
if
(
local
->
AoMask
[
i
]
&
m
)
{
io_sChannel
*
chanp
=
local
->
AoChanList
[
i
*
8
+
j
];
pwr_sClass_ChanAo
*
cop
=
(
pwr_sClass_ChanAo
*
)
chanp
->
cop
;
pwr_sClass_Ao
*
sop
=
(
pwr_sClass_Ao
*
)
chanp
->
sop
;
if
(
cop
->
CalculateNewCoef
)
// Request to calculate new coefficients
io_AoRangeToCoef
(
chanp
);
value
=
*
(
pwr_tFloat32
*
)
chanp
->
vbp
*
cop
->
OutPolyCoef1
+
cop
->
OutPolyCoef0
+
0
.
49
;
if
(
value
<
0
)
value
=
0
;
else
if
(
value
>
255
)
value
=
255
;
msg
.
data
[
local
->
DoSize
+
ao_cnt
]
=
value
;
sop
->
SigValue
=
cop
->
SigValPolyCoef1
*
*
(
pwr_tFloat32
*
)
chanp
->
vbp
+
cop
->
SigValPolyCoef0
;
sop
->
RawValue
=
value
;
ao_cnt
++
;
}
}
}
// logg( "Write All");
sts
=
write
(
local
->
fd
,
&
msg
,
msg
.
size
);
}
...
...
@@ -652,11 +784,30 @@ static pwr_tStatus IoCardWrite( io_tCtx ctx,
return
IO__ERRDEVICE
;
}
if
(
local
->
DiSize
&&
op
->
Options
&
pwr_mArduino_OptionsMask_OptimizedDiPoll
)
{
if
(
op
->
Options
&
pwr_mArduino_OptionsMask_OptimizedDiPoll
)
{
ard_sMsg
msg
;
int
skip_ai
;
ard_eMsgType
mtype
;
if
(
local
->
AiSize
)
{
skip_ai
=
0
;
if
(
op
->
AiScanInterval
>
1
)
skip_ai
=
local
->
AiIntervalCnt
;
}
else
skip_ai
=
1
;
if
(
local
->
DiSize
&&
skip_ai
)
mtype
=
ard_eMsgType_DiRead
;
else
if
(
local
->
DiSize
&&
!
skip_ai
)
mtype
=
ard_eMsgType_ReadAll
;
else
if
(
!
skip_ai
)
mtype
=
ard_eMsgType_AiRead
;
else
mtype
=
ard_eMsgType_No
;
poll
_di
(
&
msg
,
local
);
poll
(
&
msg
,
local
,
mtype
);
}
return
IO__SUCCESS
;
...
...
remote/exe/rs_remote_wmq/src/rs_remote_wmq.c
View file @
37dcaf5f
...
...
@@ -77,7 +77,8 @@ pwr_sClass_RemnodeWMQ *rn_wmq;
char
mgr_name
[
MQ_Q_MGR_NAME_LENGTH
];
MQHCONN
Hconn
;
//MQCNO Connect_options = {MQCNO_DEFAULT};
//MQCD ClientConn = {MQCD_CLIENT_CONN_DEFAULT};
MQOD
RcvObjDesc
=
{
MQOD_DEFAULT
};
MQLONG
RcvOpenOptions
;
// options that control the open-call
MQOD
SndObjDesc
=
{
MQOD_DEFAULT
};
...
...
@@ -86,7 +87,7 @@ char rcv_que_name[MQ_Q_NAME_LENGTH];
char
snd_que_name
[
MQ_Q_NAME_LENGTH
];
MQHOBJ
RcvHobj
;
// object handle
MQHOBJ
SndHobj
;
// object handle
pwr_tBoolean
connected
=
0
;
/*************************************************************************
**************************************************************************
...
...
@@ -106,6 +107,59 @@ void RemoteSleep(float time)
return
;
}
/*************************************************************************
**************************************************************************
*
* Namn : wmq_connectandopen
*
* Typ : unsigned int
*
* Typ Parameter IOGF Beskrivning
*
* Beskrivning : Invoked when a MQ message is received.
*
**************************************************************************
**************************************************************************/
unsigned
int
wmq_connectandopen
()
{
MQLONG
CompCode
;
MQLONG
Reason
;
MQCONN
(
mgr_name
,
&
Hconn
,
&
CompCode
,
&
Reason
);
if
((
CompCode
!=
MQCC_OK
)
|
(
Reason
!=
MQRC_NONE
))
{
// errh_Fatal("MQCONN failed, queue mgr: %s, Code: %d, Reason: %d", mgr_name, CompCode, Reason);
// errh_SetStatus(PWR__SRVTERM);
if
(
!
((
CompCode
==
MQCC_WARNING
)
&&
(
Reason
==
MQRC_ALREADY_CONNECTED
)))
return
0
;
}
/* Open queue for receiving messages */
MQOPEN
(
Hconn
,
&
RcvObjDesc
,
RcvOpenOptions
,
&
RcvHobj
,
&
CompCode
,
&
Reason
);
if
((
CompCode
!=
MQCC_OK
)
|
(
Reason
!=
MQRC_NONE
))
{
errh_Fatal
(
"MQOPEN failed, queue: %s, Code: %d, Reason: %d"
,
rcv_que_name
,
CompCode
,
Reason
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
0
);
}
/* Open queue for sending messages */
MQOPEN
(
Hconn
,
&
SndObjDesc
,
SndOpenOptions
,
&
SndHobj
,
&
CompCode
,
&
Reason
);
if
((
CompCode
!=
MQCC_OK
)
|
(
Reason
!=
MQRC_NONE
))
{
errh_Fatal
(
"MQOPEN failed, queue: %s, Code: %d, Reason: %d"
,
snd_que_name
,
CompCode
,
Reason
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
0
);
}
connected
=
1
;
return
1
;
}
/*************************************************************************
**************************************************************************
*
...
...
@@ -175,6 +229,10 @@ unsigned int wmq_receive()
else
if
(
Reason
!=
MQRC_NO_MSG_AVAILABLE
)
{
rn_wmq
->
ErrCount
++
;
errh_Error
(
"Receive failed, reason %d"
,
Reason
,
0
);
if
(
Reason
==
MQRC_CONNECTION_BROKEN
)
{
connected
=
0
;
}
}
return
(
sts
);
...
...
@@ -235,8 +293,12 @@ unsigned int wmq_send(remnode_item *remnode,
/* report reason, if any */
if
(
Reason
!=
MQRC_NONE
)
{
remtrans
->
ErrCount
++
;
errh_Error
(
"Send failed, msgid %s, Reason %d"
,
md
.
MsgId
,
Reason
,
0
);
printf
(
"MQPUT ended with reason code %d
\n
"
,
(
int
)
Reason
);
// errh_Error("Send failed, msgid %s, Reason %d", md.MsgId, Reason, 0);
// printf("MQPUT ended with reason code %d\n", (int) Reason);
if
(
Reason
==
MQRC_CONNECTION_BROKEN
)
{
connected
=
0
;
}
}
...
...
@@ -262,8 +324,6 @@ int main(int argc, char *argv[])
pwr_tStatus
sts
;
int
i
;
float
time_since_scan
=
0
.
0
;
MQLONG
CompCode
;
MQLONG
Reason
;
...
...
@@ -344,16 +404,6 @@ int main(int argc, char *argv[])
// strncpy(mgr_name, "hejsanqqq", sizeof(MQ_Q_MGR_NAME_LENGTH));
/* Connect to specified queue manager */
MQCONN
(
mgr_name
,
&
Hconn
,
&
CompCode
,
&
Reason
);
if
((
CompCode
!=
MQCC_OK
)
|
(
Reason
!=
MQRC_NONE
))
{
errh_Fatal
(
"MQCONN failed, queue mgr: %s, Code: %d, Reason: %d"
,
mgr_name
,
CompCode
,
Reason
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
0
);
}
/* Open queue for receiving messages */
strncpy
(
rcv_que_name
,
rn_wmq
->
RcvQueue
,
MQ_Q_NAME_LENGTH
);
...
...
@@ -367,16 +417,6 @@ int main(int argc, char *argv[])
RcvOpenOptions
=
MQOO_INPUT_AS_Q_DEF
|
MQOO_FAIL_IF_QUIESCING
;
/* Open queue */
MQOPEN
(
Hconn
,
&
RcvObjDesc
,
RcvOpenOptions
,
&
RcvHobj
,
&
CompCode
,
&
Reason
);
if
((
CompCode
!=
MQCC_OK
)
|
(
Reason
!=
MQRC_NONE
))
{
errh_Fatal
(
"MQOPEN failed, queue: %s, Code: %d, Reason: %d"
,
rcv_que_name
,
CompCode
,
Reason
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
0
);
}
/* Open queue for sending messages */
strncpy
(
snd_que_name
,
rn_wmq
->
SndQueue
,
MQ_Q_NAME_LENGTH
);
...
...
@@ -390,15 +430,11 @@ int main(int argc, char *argv[])
SndOpenOptions
=
MQOO_OUTPUT
|
MQOO_FAIL_IF_QUIESCING
;
MQOPEN
(
Hconn
,
&
SndObjDesc
,
SndOpenOptions
,
&
SndHobj
,
&
CompCode
,
&
Reason
);
errh_SetStatus
(
PWR__SRUN
);
if
((
CompCode
!=
MQCC_OK
)
|
(
Reason
!=
MQRC_NONE
))
{
errh_Fatal
(
"MQOPEN failed, queue: %s, Code: %d, Reason: %d"
,
snd_que_name
,
CompCode
,
Reason
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
0
);
}
/* Connect and open */
errh_SetStatus
(
PWR__SRUN
);
sts
=
wmq_connectandopen
(
);
/* Set (re)start time in remnode object */
...
...
@@ -417,13 +453,17 @@ int main(int argc, char *argv[])
time_since_scan
+=
TIME_INCR
;
if
(
!
connected
)
sts
=
wmq_connectandopen
();
if
(
connected
)
{
sts
=
wmq_receive
();
if
(
time_since_scan
>=
rn_wmq
->
ScanTime
)
{
sts
=
RemTrans_Cyclic
(
&
rn
,
&
wmq_send
);
time_since_scan
=
0
.
0
;
}
}
}
}
...
...
src/tools/pkg/deb/pwr/control
View file @
37dcaf5f
Package: pwr48
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
...
...
@@ -14,3 +14,14 @@ Description: Proview development and runtime environment package
- Remote support for Websphere Message Queue.
- Operator event logging and replay.
- Chinese translation in operator environment.
4.8.1-2
- Profinet configurator, ordernumber showed in module enum list.
- Curve window, second mark and export dialog added.
- Profibus/Profinet configurator, default module class setting added, and Appl button added.
- Configurator fix, Delete, Create and Move object menu items were not insensive in view mode.
- Plc link, problem with uppercase nodename for opt-file fixed.
- Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed.
- Plc compile, problem with compile of component subwindows fixed.
- Wb object editor, Ctrl DoubleClick MB1 didn't work on attribute references.
- Flow alloc color problem fixed.
- wb locale fix for ubuntu.
src/tools/pkg/deb/pwrdemo/control
View file @
37dcaf5f
Package: pwrdemo48
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
Depends: pwr48 (>= 4.8.1-
1
)
Depends: pwr48 (>= 4.8.1-
2
)
Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package
Proview Demo Project
...
...
src/tools/pkg/deb/pwrrt/control
View file @
37dcaf5f
Package: pwrrt
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
...
...
@@ -14,3 +14,7 @@ Description:
- Remote support for Websphere Message Queue.
- Operator event logging and replay.
- Chinese translation in operator environment.
4.8.1-2
- Curve window, second mark and export dialog added.
- Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed.
- Flow alloc color problem fixed.
src/tools/pkg/deb/pwrsev/control
View file @
37dcaf5f
Package: pwrsev
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
...
...
src/tools/pkg/ubu/pwr/control
View file @
37dcaf5f
Package: pwr48
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
...
...
@@ -14,3 +14,14 @@ Description: Proview development and runtime environment package
- Remote support for Websphere Message Queue.
- Operator event logging and replay.
- Chinese translation of operator enivornment.
4.8.1-2
- Profinet configurator, ordernumber showed in module enum list.
- Curve window, second mark and export dialog added.
- Profibus/Profinet configurator, default module class setting added, and Appl button added.
- Configurator fix, Delete, Create and Move object menu items were not insensive in view mode.
- Plc link, problem with uppercase nodename for opt-file fixed.
- Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed.
- Plc compile, problem with compile of component subwindows fixed.
- Wb object editor, Ctrl DoubleClick MB1 didn't work on attribute references.
- Flow alloc color problem fixed.
- wb locale fix for ubuntu.
src/tools/pkg/ubu/pwrdemo/control
View file @
37dcaf5f
Package: pwrdemo48
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
Depends: pwr48 (>= 4.8.1-
1
)
Depends: pwr48 (>= 4.8.1-
2
)
Replaces:
Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package
...
...
src/tools/pkg/ubu/pwrrt/control
View file @
37dcaf5f
Package: pwrrt
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
...
...
@@ -14,3 +14,7 @@ Description:
- Remote support for Websphere Message Queue.
- Operator event logging and replay.
- Chinese translation of operator enivornment.
4.8.1-2
- Curve window, second mark and export dialog added.
- Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed.
- Flow alloc color problem fixed.
src/tools/pkg/ubu/pwrsev/control
View file @
37dcaf5f
Package: pwrsev
Version: 4.8.1-
1
Version: 4.8.1-
2
Section: base
Priority: optional
Architecture: i386
...
...
src/tools/pkg/ubu_x86_64/pwr/control
View file @
37dcaf5f
Package: pwr4
7
Version: 4.
7.1-1
Package: pwr4
8
Version: 4.
8.1-2
Section: base
Priority: optional
Architecture: amd64
Depends: libc6 (>= 2.1
0.1-0ubuntu16), libgtk2.0-0 (>= 2.18.3-1ubuntu2.2), libasound2 (>= 1.0.20-3ubuntu6.1), libdb4.7 (>=4.7.25-7ubuntu2), libdb4.7++ (>=4.7.25-7ubuntu2), libmysqlclient15off (>= 5.1.30really5.0.83-0ubuntu3), g++ (>= 4:4.4.1
-1ubuntu2)
Replaces: pwrrt,pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46
Depends: libc6 (>= 2.1
2.1-0ubuntu6), libgtk2.0-0 (>= 2.22.0-0ubuntu1), libasound2 (>= 1.0.23-1ubuntu2), libdb4.8 (>=4.8.30-1), libdb4.8++ (>=4.8.30-1), libmysql++3 (>= 3.0.9-1ubuntu2), g++ (>= 4:4.4.4
-1ubuntu2)
Replaces: pwrrt,pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46
,pwr47
Maintainer: Proview <postmaster@proview.se>
Description: Proview development and runtime environment package
Proview development and runtime environment
4.7.1-1 Base release
4.8.0-1 Base release
4.8.1-1
- I/O support for Arduino USB board.
- Remote support for Websphere Message Queue.
- Operator event logging and replay.
- Chinese translation in operator environment.
4.8.1-2
- Profinet configurator, ordernumber showed in module enum list.
- Curve window, second mark and export dialog added.
- Profibus/Profinet configurator, default module class setting added, and Appl button added.
- Configurator fix, Delete, Create and Move object menu items were not insensive in view mode.
- Plc link, problem with uppercase nodename for opt-file fixed.
- Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed.
- Plc compile, problem with compile of component subwindows fixed.
- Wb object editor, Ctrl DoubleClick MB1 didn't work on attribute references.
- Flow alloc color problem fixed.
- wb locale fix for ubuntu.
src/tools/pkg/ubu_x86_64/pwrdemo/control
View file @
37dcaf5f
Package: pwrdemo4
7
Version: 4.
7.1-1
Package: pwrdemo4
8
Version: 4.
8.1-2
Section: base
Priority: optional
Architecture: amd64
Depends: pwr4
7 (>= 4.7.1-1
)
Depends: pwr4
8 (>= 4.8.1-2
)
Replaces:
Maintainer: Proview <postmaster@proview.se>
Description: Proview Demo Project package
Proview Demo Project
4.
7.1
-1 Base release
4.
8.0
-1 Base release
src/tools/pkg/ubu_x86_64/pwrrt/control
View file @
37dcaf5f
Package: pwrrt
Version: 4.
7.1-1
Version: 4.
8.1-2
Section: base
Priority: optional
Architecture: amd64
...
...
@@ -8,4 +8,13 @@ Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47
Maintainer: Proview <postmaster@proview.se>
Description:
Proview runtime environment
4.7.1-1 Base release
4.8.0-1 Base release
4.8.1-1
- I/O support for Arduino USB board.
- Remote support for Websphere Message Queue.
- Operator event logging and replay.
- Chinese translation in operator environment.
4.8.1-2
- Curve window, second mark and export dialog added.
- Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed.
- Flow alloc color problem fixed.
src/tools/pkg/ubu_x86_64/pwrsev/control
View file @
37dcaf5f
Package: pwrsev
Version: 4.
7.1-1
Version: 4.
8.1-2
Section: base
Priority: optional
Architecture: amd64
...
...
@@ -8,4 +8,4 @@ Replaces: pwr34,pwr39,pwr40,pwr41,pwr42,pwr43,pwr44,pwr45,pwr46,pwr47
Maintainer: Proview <postmaster@proview.se>
Description:
Proview storage environment
4.
7.1
-1 Base release
4.
8.0
-1 Base release
xtt/lib/xtt/motif/xtt_xattone_motif.cpp
View file @
37dcaf5f
...
...
@@ -120,7 +120,7 @@ int XAttOneMotif::change_value( int set_focus)
Widget
text_w
;
char
*
value
=
0
;
Arg
args
[
5
];
int
input_size
;
int
input_size
=
80
;
char
aval
[
1024
];
char
buf
[
1024
];
int
len
;
...
...
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