Commit 561d0a79 authored by claes's avatar claes

Connect method for ATv and DTv

parent 130fc06d
!
! Proview $Id: pwrb_c_cstoatv.wb_load,v 1.2 2006-04-28 04:59:58 claes Exp $
! Proview $Id: pwrb_c_cstoatv.wb_load,v 1.3 2007-01-24 12:38:31 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -135,7 +135,7 @@ SObject pwrb:Class
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 1
Attr connectmethod = 18
Attr connectmethod = 30
Attr executeordermethod = 2
Attr objname = "CStoATv"
Attr graphname = "CStoATv"
......
!
! Proview $Id: pwrb_c_cstodtv.wb_load,v 1.2 2006-04-28 04:59:58 claes Exp $
! Proview $Id: pwrb_c_cstodtv.wb_load,v 1.3 2007-01-24 12:38:31 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -135,7 +135,7 @@ SObject pwrb:Class
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 1
Attr connectmethod = 18
Attr connectmethod = 31
Attr executeordermethod = 2
Attr objname = "CStoDTv"
Attr graphname = "CStoDTv"
......
!
! Proview $Id: pwrb_c_getatv.wb_load,v 1.1 2006-04-24 13:15:30 claes Exp $
! Proview $Id: pwrb_c_getatv.wb_load,v 1.2 2007-01-24 12:38:31 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -106,7 +106,7 @@ SObject pwrb:Class
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr connectmethod = 18
Attr connectmethod = 30
Attr executeordermethod = 0
Attr objname = "GetAtv"
Attr graphname = "ATv"
......
!
! Proview $Id: pwrb_c_getdtv.wb_load,v 1.1 2006-04-24 13:15:30 claes Exp $
! Proview $Id: pwrb_c_getdtv.wb_load,v 1.2 2007-01-24 12:38:31 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -106,7 +106,7 @@ SObject pwrb:Class
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr connectmethod = 18
Attr connectmethod = 31
Attr executeordermethod = 0
Attr objname = "GetDtv"
Attr graphname = "DTv"
......
!
! Proview $Id: pwrb_c_stoatv.wb_load,v 1.2 2006-04-28 04:59:58 claes Exp $
! Proview $Id: pwrb_c_stoatv.wb_load,v 1.3 2007-01-24 12:38:31 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -107,7 +107,7 @@ SObject pwrb:Class
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr connectmethod = 18
Attr connectmethod = 30
Attr executeordermethod = 2
Attr objname = "StoATv"
Attr graphname = "StoATv"
......
!
! Proview $Id: pwrb_c_stodtv.wb_load,v 1.2 2006-04-28 04:59:58 claes Exp $
! Proview $Id: pwrb_c_stodtv.wb_load,v 1.3 2007-01-24 12:38:31 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......@@ -107,7 +107,7 @@ SObject pwrb:Class
Attr compindex = 0
Attr tracemethod = 0
Attr traceindex = 0
Attr connectmethod = 18
Attr connectmethod = 31
Attr executeordermethod = 2
Attr objname = "StoDTv"
Attr graphname = "StoDTv"
......
/*
* Proview $Id: wb_gobj.cpp,v 1.1 2007-01-04 07:29:03 claes Exp $
* Proview $Id: wb_gobj.cpp,v 1.2 2007-01-24 12:38:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -41,7 +41,7 @@
#define BEEP putchar( '\7' );
#define GOBJ_MAX_METHOD 29
#define GOBJ_MAX_METHOD 31
typedef int (* gobj_tMethod)( WFoe *, vldh_t_node, unsigned long);
......@@ -75,6 +75,8 @@ int gobj_get_object_m26( WFoe *foe, vldh_t_node node, unsigned long index);
int gobj_get_object_m27( WFoe *foe, vldh_t_node node, unsigned long index);
int gobj_get_object_m28( WFoe *foe, vldh_t_node node, unsigned long index);
int gobj_get_object_m29( WFoe *foe, vldh_t_node node, unsigned long index);
int gobj_get_object_m30( WFoe *foe, vldh_t_node node, unsigned long index);
int gobj_get_object_m31( WFoe *foe, vldh_t_node node, unsigned long index);
gobj_tMethod gobj_get_object_m[40] = {
gobj_get_object_m0,
......@@ -107,6 +109,8 @@ gobj_tMethod gobj_get_object_m[40] = {
gobj_get_object_m27,
gobj_get_object_m28,
gobj_get_object_m29,
gobj_get_object_m30,
gobj_get_object_m31,
};
static int gobj_expand_m0( WFoe *foe,
......@@ -2599,6 +2603,112 @@ int gobj_get_object_m29( WFoe *foe, vldh_t_node node, unsigned long index)
return FOE__SUCCESS;
}
//
// Method for getatv, stoatv, cstoatv. Inserts the selected atv-object in the
// navigator in the parameter AtvObject in a GetATv object.
//
int gobj_get_object_m30( WFoe *foe, vldh_t_node node, unsigned long index)
{
pwr_tClassId cid;
ldh_tSesContext ldhses;
int sts;
vldh_t_plc plc;
pwr_sAttrRef attrref;
int is_attr;
/* Get the selected object in the navigator */
plc = (node->hn.wind)->hw.plc;
ldhses =(node->hn.wind)->hw.ldhses;
sts = gobj_get_select( foe, &attrref, &is_attr);
if ( EVEN(sts)) {
foe->message( "Select ATv object in the navigator");
BEEP;
return sts;
}
/* Check that the objdid is an av object */
sts = ldh_GetAttrRefTid( ldhses, &attrref, &cid);
if (EVEN(sts)) return sts;
if ( cid != pwr_cClass_ATv) {
foe->message( "Selected object is not a ATv object");
BEEP;
return 0;
}
if ( cdh_IsClassVolume( node->ln.oid.vid)) {
gobj_ref_replace( ldhses, node, &attrref);
if ( EVEN(sts)) return sts;
}
/* Set the parameter value */
sts = ldh_SetObjectPar( ldhses,
node->ln.oid,
"DevBody",
"ATvObject",
(char *)&attrref, sizeof(attrref));
if ( EVEN(sts)) return sts;
foe->gre->node_update( node);
return FOE__SUCCESS;
}
//
// Method for getatv, stodtv, cstodtv. Inserts the selected dtv-object in the
// navigator in the parameter DtvObject in a GetDTv object.
//
int gobj_get_object_m31( WFoe *foe, vldh_t_node node, unsigned long index)
{
pwr_tClassId cid;
ldh_tSesContext ldhses;
int sts;
vldh_t_plc plc;
pwr_sAttrRef attrref;
int is_attr;
/* Get the selected object in the navigator */
plc = (node->hn.wind)->hw.plc;
ldhses =(node->hn.wind)->hw.ldhses;
sts = gobj_get_select( foe, &attrref, &is_attr);
if ( EVEN(sts)) {
foe->message( "Select DTv object in the navigator");
BEEP;
return sts;
}
/* Check that the objdid is an av object */
sts = ldh_GetAttrRefTid( ldhses, &attrref, &cid);
if (EVEN(sts)) return sts;
if ( cid != pwr_cClass_DTv) {
foe->message( "Selected object is not a DTv object");
BEEP;
return 0;
}
if ( cdh_IsClassVolume( node->ln.oid.vid)) {
gobj_ref_replace( ldhses, node, &attrref);
if ( EVEN(sts)) return sts;
}
/* Set the parameter value */
sts = ldh_SetObjectPar( ldhses,
node->ln.oid,
"DevBody",
"DTvObject",
(char *)&attrref, sizeof(attrref));
if ( EVEN(sts)) return sts;
foe->gre->node_update( node);
return FOE__SUCCESS;
}
//
// Description: Method for objects with nothing to expand
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment