增加自定义.xconf文件存储配置信息
如何配置Config File

如何配置Config File1. 基本参数............................................................................. (2)1.1NetworkAccess ................................................................. .. (2)1.2 GlobalPrivacyEnable............................................................ .. (2)1.3 UsServiceFlow &DsServiceFlow ................................................................. (2)2. 扩展参数............................................................................. (3)2.1DownstreamFrequency ........................................................... .. (3)2.2 UpstreamChannelId.............................................................. .. (3)2.3 MaxCPE......................................................................... .. (4)2.4MaxClassifiers ................................................................ . (4)2.5 BPI 扩展参数............................................................................. . (4)AuthTimeout ................................................................... .. (4)ReAuthTimeout ................................................................. (4)AuthGraceTime.................................................................. .. (4)OperTimeout ................................................................... .. (4)ReKeyTimeout .................................................................. (4)TEKGraceTime .................................................................. .. (4)AuthRejectTimeout ............................................................. . (5)SAMapWaitTimeout .............................................................. . (5)SAMapMaxRetries................................................................ .. (5)exp:.......................................................................... . (5)2.6 Upstream Service flow参数扩展设置 (5)UsServiceFlowRef .............................................................. . (5)QosParamSetType................................................................ (5)*TrafficPriority............................................................... (6)MaxRateSustained .............................................................. . (6)MaxTrafficBurst ............................................................... . (6)MinReservedRate................................................................ . (6)MinResPacketSize .............................................................. . (6)ActQosParamsTimeout ........................................................... (6)AdmQosParamsTimeout ........................................................... . (6)MaxConcatenatedBurst .......................................................... . (6)特服设置:........................................................................... .. (7)2.7 PHS 参数设置............................................................................. (9)2.8 Us Packet Classifier参数配置............................................................................. . (10)ClassifierRef:................................................................ (10)ServiceFlowRef:............................................................... .. (10)RulePriority:................................................................. (10)ActivationState:.............................................................. . (10)IpPacketClassifier ............................................................ .. (10)IpProto:...................................................................... (10)1. 基本参数要配置一份正确的 config file,必须配置的几个必要参数是:1.1 NetworkAccess这个主要是用来描述是否需要将与 cpe 的网络连通,也就是说一旦将该参数的值设置为0,就表明从连接上该 cm的 cpe 上发送的数据在 cm端都会被丢弃的,而一旦将该参数设置为 1 后,cm和 cmts 之间就可以互相通信。
C#winform添加配置文件

C# winform 添加配置文件1. 首先创建一个winform解决方案2. 与添加类文件相同的方法添加配置文件,比如:右击解决方案下的项目名称—>添加—>新建项—>选择 “应用程序配置文件”,.net默认文件名为app.config,点击确定打开文件app.config,加入配置文件内容,比如:<?xml version="1.0" encoding="utf-8" ?><configuration><appSettings><add key="Author Name" value="SOPPER" /><add key="sqlconn" value="Data Source=(local);password=sa;user id=sa;Initial Catalog =db" /></appSettings></configuration>3. 右击解决方案下的 引用—>添加引用,选择 .net项下的System.Configuration 点击确定4. 在程序代码中加入using System.Configuration;最后就可以用下面的代码来使用配置文件了string appName =ConfigurationSettings.AppSettings["author Name"];string strSql = ConfigurationManager.AppSettings["sqlconn"];//获取配置文件里自己设置的连接字符串//string strSql = System.Configuration.ConfigurationManager.ConnectionStrings[0].ConnectionString;//获取系统默认的连接字符串 label1.Text = appName;label2.Text = strSql;注:这里的配置文件名称是app.config,在生成应用程序时,会在应用程序的目录下重新生成一个config文件,文件名与应用程序文件名相同,后缀是.config,(比如:winform.exe的配置文件名为winform.exe.config)此时的应用程序使用的配置文件就是与它同名的config文件。
LCF文件使用说明

Codewarrior 2。
10是飞思卡尔32位汽车级单片机Qorriva系列的编译器,与之前版本2。
8、2。
9完全兼容。
许多新用户对codewarrior链接文件不是十分了解,本文将针对链接文件的常见问题以及段的定义进行介绍帮助用户快速了解和使用CodeWarrior。
LCF 文件定义及用法介绍链接文件用来控制不同类型数据代码、数据以某种排列方式在最终在生成的可执行文件或者二进制文件,调试文件ROMSECTIONS段的定义{GROUP : {// 它的定义需要遵从本例程方式”GROUP:{}” .“{}”中是内容部分.init : {} //.init段中所有内容。
init_vle (VLECODE) :{ //.init_vle(使用VLE代码)*(。
init)*(。
init_vle)}} 〉init//可以参看前面的init段在存储空间的定义.本GROUP中的所有内容放在init段中,”>”代表放在哪个段GROUP :{.ivor_branch_table (VLECODE) ALIGN (4096):{} //ALIGN(4096)按照4096字节对齐.__exception_handlers (VLECODE) LOAD (_e_ivor_branch_table): {}// LOAD()将本段加载到指定地址} 〉exception_handlersGROUP : {。
text (TEXT) ALIGN(0x10): {}.text_vle (VLECODE)ALIGN(0x10): {*(.text)*(.text_vle)}.rodata (CONST): {*(.rdata)*(.rodata)}.ctors :{}。
dtors :{}extab : {}extabindex : {}}> pseudo_romGROUP :{。
__uninitialized_intc_handlertable ALIGN(0x10) :{}.data :{}。
LCF文件使用说明

LCF文件使用说明一、概述LCF(Library Configuration File)文件是C/C++编译器中的一个配置文件,用于控制编译器对库文件的查找和链接过程。
LCF文件可以指定编译器在编译和链接过程中使用的库文件的路径、库文件的链接顺序和库文件的链接方式等信息。
本文将详细介绍LCF文件的使用方法。
二、LCF文件的语法1. search_dir:指定库文件的路径。
语法为search_dir dir_name,其中dir_name为库文件的路径。
2. input:指定要链接的库文件。
语法为input lib_name,其中lib_name为要链接的库文件名。
3. group:将一组库文件链接为一个模块。
语法为group(lib_name1,lib_name2,...,lib_namen),其中lib_name1到lib_namen为要链接的库文件。
4. link:指定库文件的链接方式。
语法为link type,其中type为链接方式。
常用的链接方式有static、dynamic和auto。
5. output:指定输出文件名。
语法为output file_name,其中file_name为输出文件名。
三、LCF文件的使用方法使用LCF文件可以有效地管理代码中使用到的库文件,减少编译和链接过程中的错误和冗余。
下面是LCF文件的使用方法:3. 使用LCF文件:在编译和链接代码时,使用-lcf选项指定LCF文件。
gcc -o output_file source_file.c -lcf lcf_file_name.lcf四、LCF文件的示例下面是一个LCF文件的示例:search_dir /usr/libinput lib1input lib2group(lib3, lib4, lib5)link staticoutput my_output在这个示例中,首先通过search_dir命令指定库文件的路径为/usr/lib。
c#设置文件及文件夹的属性

c#设置⽂件及⽂件夹的属性c#中通过FileAttributes枚举来设置⽂件或⽂件夹的属性。
FileAttributes 枚举成员名称说明Archive ⽂件的存档状态。
应⽤程序使⽤此属性为⽂件加上备份或移除标记。
Compressed ⽂件已压缩。
Device 保留供将来使⽤。
Directory ⽂件为⼀个⽬录。
Encrypted 该⽂件或⽬录是加密的。
对于⽂件来说,表⽰⽂件中的所有数据都是加密的。
对于⽬录来说,表⽰新创建的⽂件和⽬录在默认情况下是加密的。
Hidden ⽂件是隐藏的,因此没有包括在普通的⽬录列表中。
Normal ⽂件正常,没有设置其他的属性。
此属性仅在单独使⽤时有效。
NotContentIndexed 操作系统的内容索引服务不会创建此⽂件的索引。
Offline ⽂件已脱机。
⽂件数据不能⽴即供使⽤。
ReadOnly ⽂件为只读。
ReparsePoint ⽂件包含⼀个重新分析点,它是⼀个与⽂件或⽬录关联的⽤户定义的数据块。
SparseFile ⽂件为稀疏⽂件。
稀疏⽂件⼀般是数据通常为零的⼤⽂件。
System ⽂件为系统⽂件。
⽂件是操作系统的⼀部分或由操作系统以独占⽅式使⽤。
Temporary ⽂件是临时⽂件。
⽂件系统试图将所有数据保留在内存中以便更快地访问,⽽不是将数据刷新回⼤容量存储器中。
不再需要临时⽂件时,应⽤程序会⽴即将其删除。
看⼀个简单的例⼦:///<summary>///设置⽂件只读///</summary>///<param name="sender"></param>///<param name="e"></param>protected void Button2_Click(object sender, EventArgs e){//设置⽂件属性File.SetAttributes(Server.MapPath("~/TextFile.txt"), FileAttributes.ReadOnly);//获取⽂件属性FileAttributes MyAttributes = File.GetAttributes(Server.MapPath("~/TextFile.txt"));Literal2.Text = MyAttributes.ToString();}FileAttributes 具有FlagsAttribute属性,将枚举作为位域(即⼀组标志)处理。
wcf config 配置详解

httpGetEnabled - bool类型的值,表示是否允许通过HTTP的get方法获取sevice的WSDL元数据
httpGetUrl - 如果httpGetEnabled为true,这个属性指示使用哪个URL地址发布服务的WSDL,
binding - 指定这个Endpoint使用的binding,这个banding可以是系统预定义的9个binding之一,
比如是basicHttpBinding
contract - 指定这个Endpoint对应的Contract的全限定名(名称空间.类型名)
属性说明:
storeName - 证书的存储区,可能值为:AddressBook,AuthRoot,CertificateAuthority
Disallowed,My,Root,TrustedPeople,TrustedPublisher
binding - 指定这个Endpoint使用的binding,这个banding可以是系统预定义的9个binding之一,
比如是basicHttpBinding,也可以是自定义的customBinding。binding决定了通讯的类型、
storeLocation - 证书存储位置,可能值为:CurrentUser,LocalMachine-->
<certificateReference storeName="" storeLocation="">
</behavior>
</serviceBehaviors>
<!-- 定义Endpiont的行为-->
<endpointBehaviors>
在C#类库中使用App.config文件自定义配置

在C#类库中使⽤App.config⽂件⾃定义配置 做项⽬时,经常需要在⾃⼰设计的类库中使⽤很多⽤户配置。
虽然在应⽤程序的App.config和Web应⽤程序web.config这样的⽂件⾥配置也能满⾜需求,但这样做不仅会让主配置⽂件的内容变得多、杂,还会让模块依赖主程序的配置⽂件。
我们知道在VS中,可以在类库项⽬⾥添加⼀种叫做“应⽤程序配置⽂件”的⽂件,这是标准的.NET配置⽂件,模板⾃带“configuration”元素,编辑时还会有智能提⽰。
但是怎么在程序代码中使⽤写在App.config⾥的配置呢?近⽇在⽹上搜了⼀通,却⼀⽆所获。
于是只好⾃已动⼿! 我以前做的⼀个项⽬⾥,⽤到过类型的实现⽅式。
可以获取在类库App.config⽂件中“appSettings”和“conectionStrings”节添加的⾃定义配置,但是不能⾃定义配置节。
从MSDN上了解到,要想在配置⽂件中⾃定义配置节,需要实现⼀个⾃定义的ConfigurationSection。
两下结合起来,想在类库中⽤App.config彻底⾃定义配置的需求就可以实现了。
现在分享出来,希望对看到这篇⽂章的朋友有所帮助。
第⼀步:创建项⽬和类库: 新建⼀个Windows控制台应⽤程序“MyDemo”,然后再新建⼀个C#类库“MyDemo.Config”,并在MyDemo中添加对MyDemo.Config的引⽤。
第⼆步:添加引⽤,新建配置⽂件: 在MyDemo.Config中先删除除System之外的所有引⽤,然后添加对System.Configuration库的引⽤,并新建⼀个配置⽂件App.config。
第三步:在MyDemo.Config⾥⾯添加⼀个静态类“ConfigManager”,代码⾥这样写:View Codeusing System;using System.Configuration;namespace MyDemo.Config{public static class ConfigManager{readonly static bool _Error;static Configuration _AppConfig;static ConfigManager(){string dllPath = string.Format("{0}\\{1}.dll", AppDomain.CurrentDomain.RelativeSearchPath ?? AppDomain.CurrentDomain.BaseDirectory, "MyDemo.Config");try{_AppConfig = ConfigurationManager.OpenExeConfiguration(dllPath);}catch(ConfigurationErrorsException){_Error = true;}}public static KeyValueConfigurationCollection AppSettings{get{if (_Error) return null;return _AppConfig.AppSettings.Settings;}}public static ConnectionStringSettingsCollection ConnectionStrings{get{if (_Error) return null;return _AppConfig.ConnectionStrings.ConnectionStrings;}}}} 通过AppDomain.CurrentDomain.BaseDirectory和稳定的类库名称,来获取实际运⾏中该dll⽂件的具体物理路径,然后通过ConfigurationManager的OpenExeConfiguration⽅法就能获取到相应的dll.config⽂件中的配置。
Windchill面试资料总结

Windchill面试资料1、UI部分:1.1、navigation(菜单)一级菜单:Custom-actionModels.xml:<model name=”main navigation”><action name=”China” type=”navigation”/></model>Custom-actions.xml:<listofactions><objecttype name=”navigation” class=”” resourceBudle=”com.ptc.core.ui.navigationRB”><action name=” China” renderType=”GENERAL"><command class="netmarkets" method="servlet/Navigation?tab=China" windowType="page" /> </action></objecttype>二级菜单:Custom-actionModels.xml:<model name=” China”><action name=”XX” type=”China”></model>Custom-actions.xml:<objecttype name=” China” class=””><action name=”XX”><command uri=”XXXX.jsp” windowtype=”page”></action></objecttype>三级菜单(partManagement-actionmodels.xml,changemanagement-actionmodel.xml,DocumentManagement-actionmodel.xml):Custom-actionModels.xml:<model name="third_level_nav_part"><action name="productStructure" type="object"/><submodel name="general"/><submodel name="relatedItems"/><submodel name="history"/><submodel name="collaboration"/>下拉菜单:Custom-actionModels.xml:<model name="customMenubar"><submodel name="file"/></model><model name="file"><action name="list_cut" type="object"/><action name="list_copy" type="object"/><action name="list_paste" type="folder"/><action name="separator" type="separator"/></model>1.2、button(按钮)创建按钮是一个十分简单的过程,例如要在如图所示的部分创建一个按钮:第一步:在导航中输入&jcaDebug=1第二步:查看debug之后发现此工具栏的Action Model Name=product list第四步:点击“定制”、“工具”后出现:第五步:在product list点击“搜索”后出现:第六步:点击“”后出现:第七步:查看PartManager-actionmodels.xml复制</model><model name="product list"><action name="createProductWizard" type="product"/></model>到custom-actionModels.xml然后添加<action name="create" type="product"/>第八步:在custom-action.xml中添加<objecttype name="product" class="wt.pdmlink.PDMLinkProduct" resourceBundle="com.ptc.windchill.enterprise.product.productResourceClient"> <action name="endItems"/><action name="createProductWizard" ajax="row"><commandclass="com.ptc.windchill.enterprise.product.forms.CreateProductFormProcessor"method="execute" windowType="popup"/></action><action name="editProductWizard" ajax="row"><commandclass="com.ptc.windchill.enterprise.container.forms.EditContainerFormProcessor"method="execute" windowType="popup"/></action><action name="editProductAttributesWizStep" id="editProductAttributesWizStep" preloadWizardPage="true" required="true"><command windowType="wizard_step"/></action><action name="create" ajax="row"><commandclass="com.ptc.windchill.enterprise.product.forms.CreateProductFormProcessor"method="execute" windowType="popup"/><title>创建产品</title><tooltip>创建产品</tooltip><label>创建产品</label><icon>netmarkets/images/arrow_rightright.gif</icon></action></objecttype>第九步:reload xml:java markets.util.misc.NmActionServiceHelper1.3、页面客制化Tree①写两个方法:public List getRootNodes() throws WTException和public Map getNodes(List list) throws WTExceptiongetRootNodes()方法如下public List getRootNodes() throws WTException {NmCommandBean nmcommandbean = getModelContext().getNmCommandBean();if (nmcommandbean == null) {return null;}//获取上下文的一个对象NmOid nmoid = nmcommandbean.getPrimaryOid();WTPart wtpart;if (nmoid == null) {wtpart = getGolfCart();} else {//确定这个对象nmoid是否是这个类(WTPart)提供的实例if (!nmoid.isA(wt.part.WTPart.class)) {// The following 2 lines are one linethrow new ClassCastException((new StringBuilder()).append("Expected part, but was: ").append(nmoid).toString());}//获得指向的对象wtpart = (WTPart) nmoid.getRef();}if (wtpart == null) {return null;} else {configSpec = ConfigHelper.service.getConfigSpecFor(wtpart);//返回一个一个指定的wtpart的listreturn Collections.singletonList(wtpart);}}getNodes()方法如下public Map getNodes(List list) throws WTException {if (configSpec == null) {configSpec = getDefaultConfigSpec();}HashMap hashmap = new HashMap();Persistable p[][][] = WTPartHelper.service.getUsesWTParts(new WTArrayList(list), configSpec);ListIterator listiterator = list.listIterator();do {if (!listiterator.hasNext()) {break;}WTPart wtpart = (WTPart) listiterator.next();wt.fc.Persistable p1[][] = p[listiterator.previousIndex()];if (p1 != null) {ArrayList arraylist = new ArrayList(p1.length);hashmap.put(wtpart, arraylist);wt.fc.Persistable p2[][] = p1;int i = p2.length;int j = 0;while (j < i) {wt.fc.Persistable p3[] = p2[j];arraylist.add(p3[1]);j++;}}} while (true);return hashmap;}上面两个方法大概是讲获得上下文对象的节点和子节点,具体意思还没弄懂,懂的麻烦告诉一下。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
请按照如下步骤进行: 第一步,新建任一后缀为.xconf 的文件,存放于 codebase 目录下。我在 codebase 的 ext 文件夹里新 建一个 test.properties.xconf 文件,路径为 codebase/ext/test.properties.xconf。 第二步,向 test.properties.xconf 里添加基本的配置信息,内容如下:
第三步,打开 windchill shell 执行如下命令:
Java 代码 1. xconfmanager -Байду номын сангаас codebase/ext/test.properties.xconf -p
成功执行完上述步骤后,进行如下验证: 1,观察 codebase/ext 目录,多了两个文件:test.properties 和 test.properties.annotated,这两个文件 都是不可以手动修改的,只能使用命令将.xconf 文件的内容添加进去。 2,打开<wt_home>/declarations.xconf,可以看到在文件的末尾添加了如下信息:
以便将 test.properties.xconf 里的内容写入 test.properties 和 test.properties.annotated 文件。 最后,重启 windchill 服务,添加的内容即可生效。 第一篇 windchill 相关的文章发布,以后会陆续发布经过准确测试的代码。
Xml 代码 1. <ConfigurationRef xlink:href="codebase/ext/test.properties.xconf"/>
如果上述文件和内容都能正确创建添加,说明我们自定义的 test.properties.xconf 生效,同时可以向该 文件添加需要的内容。 例如: 可修改 test.properties.xconf 文件,添加一条验证 action 的信息到<Configuration></Configuration>节 点里,内容如下:
Xml 代码 1. <?xml version="1.0" encoding="utf-8"?> 2. <!DOCTYPE Configuration SYSTEM "xconf.dtd"> 3. <!--配置自动生成的 properties 文件的位置 --> 4. <Configuration targetFile="codebase/ext/test.properties"> 5. <!-6. 配置该文件内添加的客制化信息的默认存储位置,一般和生成的 properties 文件位置相同 7. --> 8. <Property default="ext/test.properties" name="wt.services.applicationcontext.WT ServiceProviderFromProperties.customPropertyFiles" /> 9. </Configuration>
Xml 代码 1. <Service context="default" name="com.ptc.core.ui.validation.UIComponentValidato r"> 2. 3. <Option requestor="null" serviceClass="ext.portal.validation.MainTabVal idator" selector="product" /> <Option requestor="null" serviceClass="extportal.validation.MainTabVali
dator" selector="project" /> 4. </Service>
在这里我增加了客制化验证 product(产品库菜单)和 project(项目库菜单)显示或隐藏的内容。 当然,添加完毕,还需要执行命令
Java 代码 1. xconfmanager -i codebase/ext/test.properties.xconf -p