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
53703367
Commit
53703367
authored
Sep 05, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DeleteItem message added
parent
eb69874b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
4 deletions
+79
-4
src/lib/rt/src/rt_sev_net.h
src/lib/rt/src/rt_sev_net.h
+16
-1
src/lib/rt/src/rt_sevcli.c
src/lib/rt/src/rt_sevcli.c
+61
-1
src/lib/rt/src/rt_sevcli.h
src/lib/rt/src/rt_sevcli.h
+2
-2
No files found.
src/lib/rt/src/rt_sev_net.h
View file @
53703367
/*
* Proview $Id: rt_sev_net.h,v 1.
1 2008-07-17 11:33:5
9 claes Exp $
* Proview $Id: rt_sev_net.h,v 1.
2 2008-09-05 09:00:1
9 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -38,6 +38,8 @@ typedef enum {
sev_eMsgType_HistDataStore
,
sev_eMsgType_HistDataGetRequest
,
sev_eMsgType_HistDataGet
,
sev_eMsgType_HistItemDelete
,
sev_eMsgType_HistItemStatus
}
sev_eMsgType
;
typedef
struct
{
...
...
@@ -98,6 +100,19 @@ typedef struct {
int
Data
[
1
];
}
sev_sMsgHistDataGet
;
typedef
struct
{
sev_eMsgType
Type
;
pwr_tOid
Oid
;
pwr_tOName
AName
;
}
sev_sMsgHistItemDelete
;
typedef
struct
{
sev_eMsgType
Type
;
pwr_tOid
Oid
;
pwr_tOName
AName
;
pwr_tStatus
Status
;
}
sev_sMsgHistItemStatus
;
#ifdef __cplusplus
}
#endif
...
...
src/lib/rt/src/rt_sevcli.c
View file @
53703367
/*
* Proview $Id: rt_sevcli.c,v 1.
1 2008-07-17 11:33:59
claes Exp $
* Proview $Id: rt_sevcli.c,v 1.
2 2008-09-05 09:00:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -255,3 +255,63 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
*
sts
=
SEV__SUCCESS
;
return
1
;
}
int
sevcli_delete_item
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
pwr_tOid
oid
,
char
*
aname
)
{
sev_sMsgHistItemDelete
*
msg
;
qcom_sQid
tgt
;
qcom_sPut
put
;
int
tmo
=
10000
;
qcom_sGet
get
;
pwr_tStatus
lsts
;
if
(
ctx
->
server
)
tgt
.
nid
=
ctx
->
server
;
else
tgt
.
nid
=
ctx
->
qid
.
nid
;
tgt
.
qix
=
sev_eProcSevServer
;
put
.
reply
=
ctx
->
qid
;
put
.
type
.
b
=
(
qcom_eBtype
)
sev_cMsgClass
;
put
.
type
.
s
=
(
qcom_eStype
)
sev_eMsgType_HistItemDelete
;
put
.
msg_id
=
ctx
->
msg_id
++
;
put
.
size
=
sizeof
(
*
msg
);
msg
=
(
sev_sMsgHistItemDelete
*
)
qcom_Alloc
(
sts
,
put
.
size
);
put
.
data
=
msg
;
msg
->
Type
=
sev_eMsgType_HistItemDelete
;
msg
->
Oid
=
oid
;
strncpy
(
msg
->
AName
,
aname
,
sizeof
(
msg
->
AName
));
if
(
!
qcom_Put
(
sts
,
&
tgt
,
&
put
))
{
qcom_Free
(
&
lsts
,
put
.
data
);
return
0
;
}
sev_sMsgHistItemStatus
*
rmsg
;
memset
(
&
get
,
0
,
sizeof
(
get
));
for
(;;)
{
rmsg
=
(
sev_sMsgHistItemStatus
*
)
qcom_Get
(
sts
,
&
ctx
->
qid
,
&
get
,
tmo
);
if
(
*
sts
==
QCOM__TMO
||
!
rmsg
)
return
0
;
if
(
get
.
type
.
b
==
sev_cMsgClass
&&
get
.
type
.
s
==
(
qcom_eStype
)
sev_eMsgType_HistItemStatus
&&
cdh_ObjidIsEqual
(
oid
,
rmsg
->
Oid
)
&&
cdh_NoCaseStrcmp
(
aname
,
rmsg
->
AName
)
==
0
)
break
;
qcom_Free
(
sts
,
rmsg
);
}
*
sts
=
rmsg
->
Status
;
if
(
EVEN
(
*
sts
))
return
0
;
qcom_Free
(
sts
,
rmsg
);
return
1
;
}
src/lib/rt/src/rt_sevcli.h
View file @
53703367
/*
* Proview $Id: rt_sevcli.h,v 1.
1 2008-07-17 11:33:59
claes Exp $
* Proview $Id: rt_sevcli.h,v 1.
2 2008-09-05 09:00:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -64,7 +64,7 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
char
*
aname
,
pwr_tTime
starttime
,
pwr_tTime
endtime
,
int
numpoints
,
pwr_tTime
**
tbuf
,
void
**
vbuf
,
int
*
rows
,
pwr_eType
*
vtype
,
unsigned
int
*
vsize
);
int
sevcli_delete_item
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
pwr_tOid
oid
,
char
*
aname
);
#ifdef __cplusplus
...
...
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