2008年11月11日
2008年9月12日
描述:两种结果
图片:
 在此表示感谢.
事实上是我对opengl 不是很熟悉. 所以有一些困惑。 又不知道一些函数的用法和作用
我的想法是原地(保持中心点) 画个缩放的动画.
结果实现出来之后 确是中心点也跟着变大变小了。
glscalef 用来缩放。而这个函数的功能其实也是对当前的顶点矩阵 乘一个变化矩阵. 进而改变
(在已经变化的矩阵上进行 render 需要调整数据吗?)
用的是 texture2D.m (项目向导生成的) drawAtPoint(CGPointMake(x,y));
最后我用了一个蹩脚的办法 x/scale y/scale 。 scale 是变化的数值. 放大或缩小的比率 解决了这个问题。
晚上看到dr waston 这篇turorial ,再仔细比较一下差异。
如果我没理解错的话. dr的范例的缩放应该不是以一点为中心的。是以一点为辐射状的缩放, 明天去试验一下就知道了.
//再次比较一下 应该是这里的不同. texture2D的计算方法.
GLfloat coordinates[] = { 0, _maxT,
_maxS, _maxT,
0, 0,
_maxS, 0 };
GLfloat width = (GLfloat)_width * _maxS,
height = (GLfloat)_height * _maxT;
GLfloat vertices[] = { -width / 2 + point.x, -height / 2 + point.y, 0.0,
width / 2 + point.x, -height / 2 + point.y, 0.0,
-width / 2 + point.x, height / 2 + point.y, 0.0,
width / 2 + point.x, height / 2 + point.y, 0.0 };
Sprite的计算方法
y = SCREEN_HEIGHT-y; // for OpenGL ES, (0,0) is at lower left corner!
GLfloat _minU = mX/mTexture->getTextureWidth();
GLfloat _maxU = (mX+mWidth)/mTexture->getTextureWidth();
GLfloat _minV = mY/mTexture->getTextureHeight();
GLfloat _maxV = (mY+mHeight)/mTexture->getTextureHeight();
GLfloat coordinates[] =
{
_minU, _maxV,
_maxU, _maxV,
_minU, _minV,
_maxU, _minV
};
GLfloat xx = - mWidth/2;
GLfloat yy = - mHeight/2;
GLfloat vertices[] =
{
xx, yy,
xx+mWidth, yy,
xx, yy+mHeight,
xx+mWidth, yy+mHeight
};
所以如果使用Textrure2D的 drawatpoint的函数时. 需要注意 缩放时要进行处理。
终版::
第一种方法: translatef 移动到目标点. 然后 调用 drawAtpoint( PointZero) 这就是和dr 上面用的方法类似。
而本人不熟悉这东西
第二种方法: 就是我后来蹩脚的方法. 前面不做translatef 后面调用 drawAtpoint( CGMakePoint(x/scale,y/scale)); 这可能只是适合这里. 如果x ,y ,z 三系都发生缩放。 单纯的/scale 估计就不可以了。但用Texture2D 也不可能了 因为是3D的咯。
总结起来: texture2D的 drawAtPoint 方法是要有使用条件的。
上图。
转:[dr waston]
對的,我是以圖像的中心作為所有操作的中心點,在定義那個矩形時,做了下面這個手腳:
GLfloat xx = - mWidth/2;
GLfloat yy = - mHeight/2;
(xx, yy)
_______________
! !
! !
! (x,y) !
! !
!_____________!
這樣不論你是縮放還是旋轉,都是基於這個中心點,不用再特別的調位置。
2008年4月16日
本文算是总结一下以往吧.
第一个要素:剧情。
rpg游戏 代表应该是 仙剑奇侠传. 在xp下用 dosbox 也可也可以玩的. 一些老游戏玩起来也还是那么的有意思, 所以个人感觉rpg游戏最有生命力的部分其实是剧情,其他的画面反而不是我可以在意的. 可能与人思维的容量有限 有关(可能在你思考如何通关时,更多的要依赖剧情描述提供的线索,当然也有的是道具的图像提示,与众不同的地方往往是机关) 。
第二个要素:NPC
不同的NPC,就是rpg游戏中的各个角色,如同话剧中的演员,连接起来完成整个剧情。NPC 可能会自己游走, 通常会激活任务或者贩卖物品等等.
第三个要素: 地图.
通常rpg游戏是有若干的场景支持的,hero在地图上自由行走,然后遇到npc 对话接任务, 或者购买物品(武器 食品 道具), 包括打怪.
有时会处理天气效果:下雨,下雪,刮风等等。或者屏幕的晃动.
第四个要素: 道具和任务
如果说剧情部分是偏重于文字的话, 道具和关卡任务的设定应该是游戏的核心了.通过图片变化,和玩家互动. 物品可能是某个任务的物品.
第五个要素: HERO的升级和技能(甚至是天赋分配 wow)
这部分往往是用来调节游戏的平衡性, 也是增加游戏的挑战性的。
大致上就这么多了.回到程序上,程序上要实现几个点?
1.脚本
如果要方便剧情的设定和关卡的设定,显然需要一个很好的机制来实现, 这就是脚本机制。通过实现一个脚本引擎,可以把游戏控制的函数部分通过脚本定义的方式串接起来。脚本引擎部分可以分成2部分. 引擎部分(编译器,解释器),扩展函数库。 扩展函数库是需要我们重点考虑的部分。大致应该实现如下一些功能,
1)菜单部分 menu 对话框 msgwindow :这部分就是通常我们看到的游戏中的触发npc对话之后的对话框, 往往是通过这个来选择剧情分支的。
脚本描述就是这样的
menu title ="这个开关好奇怪,似乎可以按下去喔! "
menu select ="好,我们来看看背后是什么"
menu select ="算了,还是安全第一"
showtips “”
2)主场景的控制和效果
blackin 、blackout shakescreen weatherscreen snowscreen
3)ROLE部分的控制.
addHP addMP subHP subMP ... levelUp
ChangeAction
4)更底层的一些的控制:
loadMap(参数) 加载某个地图
StartFight(参数) 激活战斗画面
ShowAnimation
loadImage
if
goto
2. 地图编辑和关卡编辑(道具,事件),通行设定。
3. 动画编辑和碰撞设定
4. HERO NPC 状态表设定.
2007年10月31日
k700如此.支持蓝牙传输文件.不支持蓝牙接口开发.
2006年6月9日
URL: http://www.jroller.com/page/shareme/J2MEEmulators thanks fetd.gott
List of J2ME Emulators and SDKs for J2ME application development on J2ME devices, part of J2ME Resources
Alcatel
Alcatel One Touch Ahead has developers ection from which you can download the J2ME Emulator after you register for free as a developer. The emulator has a profile for the 735i handset adn the other 2 version is for handset 756. Note that you have to download the PC Suite for the ahdnset 756 emulator.
Blackberry RIM-MIDP
SDKs and Tools for RIM-Free registration required to download the sdk and other tools.
DoJa-MIDP
i-Mode devices usually the 50x-i series. On second screen put in First Name, Last Name, and email address to confirm download.
DoJa 1.0 DoJa1.5 in English DoJa 2.0 DoJa 2.1 DoJa 2.2 DoJa 3.0
SonyEricsson-MIDP
Register for free at SonyEricsson-MobilityWorld. The latest emulator and sdk supports P800, P802. T610, T616, and Z600 devices.
Sharp-MIDP
TQ-GX10 from Via Vodafone, requires free registration to download in the technology section. Note: This SDk is no longer freely accessible from Vodafone as they are requiring you to have a liability bond to get access. However, with the introduction of Sharp MIDP2.0 handsets in 2005 it is fully expected that Sharp will make their own WTK/SDK freely accessible.
Brew J2ME VM for Brew Emulator from Esmertec-MIDP
Go this press release and use th pr contact email address to request VM for J2ME that works in the Brew Emulator.
Brew J2ME via J2Bridge-Qualcomm-MIDP
For devices using Brew 2.x which are; Daxion c618, Kyocera kz-820, LGE CU6260, LGE CU8188, LGE CU 8280, Samsung SCH-X339, Samsung SCH-X359, Sanyo SCP-4900, Sanyo SCP-5300, Sanyo SCP-6400, and Sanyo SCP-8100.
Register for Free and get Brew 2.x Emulators.
LG Telekom-JavaStation-MIDP
MIDP-SDK1.0.1 You want the MIDP-SDK1.0.1 file towards bottom of the page. This is the mIDP implmentation on java.ez handsets found in Korea Mobile networks.
Samsung-MIDP
Samsung Developer Site Register to download emulators for midp1 and midp2 on Samsung devices. Site is MSIE specific so must access with MSIE. This new improved site has emulators for all java enabled Samsung devices.
Nokia-MIDP
Devices in series 30, 40, and 60. Register for free to download both MIDP1.0 and MIDP2.0 sdks and emulators.
Motorola-MIDP
Register for free at motocoder to get the non IDEN sdks and emulators. IDEN sdks and emualtors can be found at IDEN Developer Community.
Devices That Use SAJE J2ME VM_MIDP
SAJE recommends using SUN's WTK emualtor for devices that use SAJE J2ME VM's to test applications.
Siemens-MIDP
Register for free at their portal and click on the developer portal to get the emulators. devices covered are; MC60(sx1) 6688i, MT50, SL45i, M46, 3118, C55, CT56, 2128, S55, S56, S57, M55i, and M55c.
PalmOS-MIDP
Both PalmOS 5 Simulator and the Tungsten Simulators are using the saem base so it does not matter except for seing screen size which one you download. PalmOS5 here and Tungsten is here and both require free regisration to download. Download the j9 VM toolkit from the Tungsten link and install like you would normally install a prc app in a simulator.
SUN-MIDP
J2ME Wireless Tool Kits and MIDP sdks
Microsoft SmartPhoneOS-MIDP
Esmertec has bought Insignia's J2ME VM Business which included a VM designed for use in the MS SmartPhoneOS platform. Awaiting for more information from Esmertec about a plugin to use in MS's emulator.
MS winCE-MIDP
You should be able to use the SuperWaba VM which is MIDP compliant within the winCe emulator via an activesync install on your PocketPC emulator downloaded from Microsoft. You need to register for free to get the download from Superwaba.
Embedded Linux-MIDP
For MontaVista Linux, OSe, and QNX which all come with IBM's j9 use a palmos5 emulator with j9 installed, see pluggedin for the j9 download.
For Linux Developers on LinuxDesktops
For those of us developing J2ME apps on LInuxOS Desktops there is a set of methods using Samba, WINE, and etc to install windows based sdks and j2me emulators to run under the Major Desktop Linux OSes. Although its written for EPOC, this HowTO can be used to figure out how to do it for J2ME sdks and emulators.
2006年6月5日
henson.midp.Float浮点类介绍 ( 您是本帖的第81访问者!)
|
|
|
|
看此文前,你可以首先参考一下《J2ME中定点库MathFP使用入门》一文。MathFP是一个定点的浮点模拟工具,这套类库没有封装细节,而是把一系列的转换操作留给了用户,这些频繁的操作非常容易出错,但是效率上占一定的优势。考虑到极少有J2ME设备设有浮点运算单元,特别是在CLDC1.0设备上不适合使用沉重的浮点运算。所以如果你的应用需要进行沉重的浮点运算,比如基于浮点的游戏,可以采用MathFP。这样至少比你采用手动的乘除法来的优雅。而对于并非沉重的浮点计算,我推荐大家使用由_Nikolay Klimchuk_ 开发的henson.midp.Float库(ver 1.01) ,一个封装良好的Float类。无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] henson.midp.Float类简介无线论坛[http://www.j2me.com.cn/bbs] 首先到http://henson.newmail.ru/j2me/Float.java下载源代码。无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] henson.midp.Float类非常适合科学计算,他的范围很大,具有64位的尾数(mantissa),64位的指数。该Float类和J2SE标准的Float类十分的相似,提供了完备的方法,参考下表:无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 非静态成员 非静态成员 常量 无线论坛[http://www.j2me.com.cn/bbs] Float()无线论坛[http://www.j2me.com.cn/bbs] Float(long value)无线论坛[http://www.j2me.com.cn/bbs] Float(long value, long e)无线论坛[http://www.j2me.com.cn/bbs] Float(Float value)无线论坛[http://www.j2me.com.cn/bbs] String toString()无线论坛[http://www.j2me.com.cn/bbs] Float Add(Float value)无线论坛[http://www.j2me.com.cn/bbs] Float Sub(Float value)无线论坛[http://www.j2me.com.cn/bbs] Float Mul(long value)无线论坛[http://www.j2me.com.cn/bbs] Float Mul(Float value)无线论坛[http://www.j2me.com.cn/bbs] Float Div(long value)无线论坛[http://www.j2me.com.cn/bbs] Float Div(Float value)无线论坛[http://www.j2me.com.cn/bbs] boolean Great(Float x)无线论坛[http://www.j2me.com.cn/bbs] boolean Less(Float x)无线论坛[http://www.j2me.com.cn/bbs] boolean Equal(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float Neg()无线论坛[http://www.j2me.com.cn/bbs] long toLong()无线论坛[http://www.j2me.com.cn/bbs] boolean isError() Float sin(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float cos(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float sqrt(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float tan(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float asin(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float acos(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float atan(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float atan2(Float x, Float y)无线论坛[http://www.j2me.com.cn/bbs] Float parse(String str, int radix)无线论坛[http://www.j2me.com.cn/bbs] Float exp(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float log(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float log10(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float pow(Float x, Float y)无线论坛[http://www.j2me.com.cn/bbs] Float ceil(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float floor(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float abs(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float Int(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float Frac(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float toRadians(Float x)无线论坛[http://www.j2me.com.cn/bbs] Float toDegrees(Float x) Float ERROR无线论坛[http://www.j2me.com.cn/bbs] Float ZERO无线论坛[http://www.j2me.com.cn/bbs] Float ONE无线论坛[http://www.j2me.com.cn/bbs] Float PI - pi无线论坛[http://www.j2me.com.cn/bbs] Float E - Euler's constant无线论坛[http://www.j2me.com.cn/bbs] Float LOG10 - Natural logarithm of 10无线论坛[http://www.j2me.com.cn/bbs] Float LOGdiv2 - Natural logarithm of 0.5无线论坛[http://www.j2me.com.cn/bbs] Float PIdiv2 - pi/2无线论坛[http://www.j2me.com.cn/bbs] Float PIdiv4 - pi/4无线论坛[http://www.j2me.com.cn/bbs] Float PIdiv6 - pi/6无线论坛[http://www.j2me.com.cn/bbs] Float PIdiv12 - pi/12无线论坛[http://www.j2me.com.cn/bbs] Float PImul2 - pi*2无线论坛[http://www.j2me.com.cn/bbs] Float PImul4 - pi*4 无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] Float的使用和大多数提供源代码的第三方库一样,只要直接将其加入到你的工程中来就可以了。无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] Float类的license很特别,根据作者的要求,需要你做到以下几点:无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 一个含有此Float类的你的产品的copy和以及对应的license 无线论坛[http://www.j2me.com.cn/bbs] 在about菜单中增加“henson.midp.Float (C) by Nikolay Klimchuk ”版权提示 无线论坛[http://www.j2me.com.cn/bbs] 如果有官方网站,则网站应该提供到http://henson.newmail.ru的链接 无线论坛[http://www.j2me.com.cn/bbs] 测试数据无线论坛[http://www.j2me.com.cn/bbs] 也许你最关心这个模拟类的速度。以下是官方的测试数据供你参考。无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 测试程序下载地址:无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] http://henson.newmail.ru/j2me/FloatTest.jad 无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 机型 sin, ms 无线论坛[http://www.j2me.com.cn/bbs] 100次 cos, ms 无线论坛[http://www.j2me.com.cn/bbs] 100 次 tan, ms 无线论坛[http://www.j2me.com.cn/bbs] 100 次 add, ms 无线论坛[http://www.j2me.com.cn/bbs] 10000 次 mul, ms 无线论坛[http://www.j2me.com.cn/bbs] 10000 次 div, ms 无线论坛[http://www.j2me.com.cn/bbs] 10000 次 sqrt, ms 无线论坛[http://www.j2me.com.cn/bbs] 1000 次 无线论坛[http://www.j2me.com.cn/bbs] 移动电话 无线论坛[http://www.j2me.com.cn/bbs] /-\ Nokia无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] N-Gage 1016 594 1641 1297 3438 6328 4219 无线论坛[http://www.j2me.com.cn/bbs] 6310i 4370 2461 7089 5363 14673 24131 20402 无线论坛[http://www.j2me.com.cn/bbs] 3510i 4202 2435 6837 5324 14550 22370 16678 无线论坛[http://www.j2me.com.cn/bbs] 6100 4407 2534 7065 5410 14905 23794 16069 无线论坛[http://www.j2me.com.cn/bbs] 6610 4381 2511 7158 5492 15056 23874 17318 无线论坛[http://www.j2me.com.cn/bbs] 3650 1094 609 1766 1297 3484 7031 4641 无线论坛[http://www.j2me.com.cn/bbs] 7650 765 453 1265 1031 2515 5328 * 无线论坛[http://www.j2me.com.cn/bbs] 6600 328 157 500 188 547 3235 1328 无线论坛[http://www.j2me.com.cn/bbs] 6220 6086 3623 10149 8325 22395 32238 23670 无线论坛[http://www.j2me.com.cn/bbs] 7600 494 290 795 614 1578 2482 1622 无线论坛[http://www.j2me.com.cn/bbs] 3100 6727 3967 10949 9054 24905 36291 26268 无线论坛[http://www.j2me.com.cn/bbs] 6230 (3.14) 965 538 1654 1088 3212 5165 * 无线论坛[http://www.j2me.com.cn/bbs] 6230 (4.28) 705 414 1197 857 2387 3669 2378 无线论坛[http://www.j2me.com.cn/bbs] 6230i (3.23) 627 351 994 619 1747 3813 1830 无线论坛[http://www.j2me.com.cn/bbs] 7250 4254 2431 7052 5466 14943 22483 14524 无线论坛[http://www.j2me.com.cn/bbs] 7610 281 141 438 187 453 2719 1109 无线论坛[http://www.j2me.com.cn/bbs] 6260 281 141 406 157 453 2766 1187 无线论坛[http://www.j2me.com.cn/bbs] 6630 110 63 156 94 203 1094 500 无线论坛[http://www.j2me.com.cn/bbs] /-\ Siemens无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] S55 28899 16559 50899 36306 101370 200670 169181 无线论坛[http://www.j2me.com.cn/bbs] M55 30441 17025 53584 38420 105500 207800 * 无线论坛[http://www.j2me.com.cn/bbs] SX1 1110 672 1875 1563 3985 7141 4203 无线论坛[http://www.j2me.com.cn/bbs] CX65 844 258 342 327 443 1219 923 无线论坛[http://www.j2me.com.cn/bbs] S65 212 139 337 245 466 1191 798 无线论坛[http://www.j2me.com.cn/bbs] M75 (new) 267 153 309 240 420 1186 790 无线论坛[http://www.j2me.com.cn/bbs] /-\ SonyEricsson无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] K300i (new) 739 354 1094 646 1716 3041 2389 无线论坛[http://www.j2me.com.cn/bbs] K750i 654 319 980 521 1496 2848 1970 无线论坛[http://www.j2me.com.cn/bbs] Z1010 785 404 1231 886 2026 3289 2603 无线论坛[http://www.j2me.com.cn/bbs] K700i 712 370 1085 639 1687 3049 1864 无线论坛[http://www.j2me.com.cn/bbs] T610 20580 11575 33585 28100 71365 87740 76280 无线论坛[http://www.j2me.com.cn/bbs] T610 (R3C) 8780 5055 14515 11385 30440 42120 34595 无线论坛[http://www.j2me.com.cn/bbs] T610 (R6C) 9875 5575 16210 12235 33295 49410 37920 无线论坛[http://www.j2me.com.cn/bbs] P900 250 109 344 156 406 2203 1062 无线论坛[http://www.j2me.com.cn/bbs] P800 500 282 813 625 1563 3250 1750 无线论坛[http://www.j2me.com.cn/bbs] Thank you to Dmitry Gorilowsky for measurements 无线论坛[http://www.j2me.com.cn/bbs] PDA 无线论坛[http://www.j2me.com.cn/bbs] /-\ Sony无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] Clie N610 48830 24960 84770 35810 102100 445530 206440 无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 辅助工具:FloatConv (1.1) 无线论坛[http://www.j2me.com.cn/bbs] _Nikolay Klimchuk_ 还开发了一些相关工具让该Float的使用变得更加的简单。FloatConv是一个数学转换器,它将数学算数表达式转换为midp1.0平台上使用henson.midp.Float的等价表达式。这样使得使用henson.midp.Float的成本大大降低了。这一工具是基于J2SE 。 无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 该工具的下载地址是:http://www.unteh.com/download/FloatConv/FloatConvW.zip无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 对CLDC1.1的扩展无线论坛[http://www.j2me.com.cn/bbs] henson.midp.Float11 是对CLDC1.1的扩展。提供了CLDC1.1相对比J2SE缺失的浮点操作:无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] Non-static members Static members Constants 无线论坛[http://www.j2me.com.cn/bbs] double asin(double x)无线论坛[http://www.j2me.com.cn/bbs] double acos(double x)无线论坛[http://www.j2me.com.cn/bbs] double atan(double x)无线论坛[http://www.j2me.com.cn/bbs] double atan2(double y, double x)无线论坛[http://www.j2me.com.cn/bbs] double exp(double x)无线论坛[http://www.j2me.com.cn/bbs] double log(double x)无线论坛[http://www.j2me.com.cn/bbs] double log10(double x)无线论坛[http://www.j2me.com.cn/bbs] double pow(double x, double y) double SQRT3 - Square root from 3无线论坛[http://www.j2me.com.cn/bbs] double LOG10 - Natural logarithm of 10无线论坛[http://www.j2me.com.cn/bbs] double LOGdiv2 - Natural logarithm of 0.5无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 下载地址:http://henson.newmail.ru/j2me/Float11.java无线论坛[http://www.j2me.com.cn/bbs] henson.midp.Float11的license和henson.midp.Float是一样的。无线论坛[http://www.j2me.com.cn/bbs] 无线论坛[http://www.j2me.com.cn/bbs] 另外一套功能相似的基于CLDC1.0的LIB是Beartronics Java J2ME Libraries的fpmathlib,地址 :http://sourceforge.net/projects/bearlib/,感兴趣的朋友可以自行研究。 |
2006年4月29日
SIP RFCs and Drafts
- Archive
- Archive for drafts
- Mailing list archive
- HTML, through March 1998
- All SIP-related drafts
- http://www.cs.columbia.edu/sip/drafts/
- SIP-related RFCs:
-
| RFC 3524 |
Mapping of Media Streams to Resource Reservation Flows |
This document defines an extension to the Session Description Protocol (SDP) grouping framework. It allows requesting a group of media streams to be mapped into a single resource reservation flow. The SDP syntax needed is defined, as well as a new "semantics" attribute called Single Reservation Flow (SRF). |
| RFC 3515 |
The Session Initiation Protocol (SIP) Refer Method |
Defines the REFER method. This Session Initiation Protocol (SIP) extension requests that the recipient REFER to a resource provided in the request. It provides a mechanism allowing the party sending the REFER to be notified of the outcome of the referenced request. This can be used to enable many applications, including call transfer. In addition to the REFER method, this document defines the the refer event package and the Refer-To request header. |
| RFC 3487 |
Requirements for Resource Priority Mechanisms for the Session Initiation Protocol (SIP) |
Summarizes requirements for prioritizing access to circuit-switched network, end system and proxy resources for emergency preparedness communications using the Session Initiation Protocol (SIP). |
| RFC 3486 |
Compressing the Session Initiation Protocol (SIP) |
Describes a mechanism to signal that compression is desired for one or more Session Initiation Protocol (SIP) messages. It also states when it is appropriate to send compressed SIP messages to a SIP entity. |
| RFC 3485 |
The Session Initiation Protocol (SIP) and Session Description Protocol (SDP) Static Dictionary for Signaling Compression (SigComp) |
The Session Initiation Protocol (SIP) is a text-based protocol for initiating and managing communication sessions. The protocol can be compressed by using Signaling Compression (SigComp). Similarly, the Session Description Protocol (SDP) is a text-based protocol intended for describing multimedia sessions for the purposes of session announcement, session invitation, and other forms of multimedia session initiation. This memo defines the SIP/SDP-specific static dictionary that SigComp may use in order to achieve higher higher efficiency. The dictionary is compression algorithm independent. |
| RFC 3428 |
Session Initiation Protocol (SIP) Extension for Instant Messaging |
Instant Messaging (IM) refers to the transfer of messages between users in near real-time. These messages are usually, but not required to be, short. IMs are often used in a conversational mode, that is, the transfer of messages back and forth is fast enough for participants to maintain an interactive conversation. This document proposes the MESSAGE method, an extension to the Session Initiation Protocol (SIP) that allows the transfer of Instant Messages. Since the MESSAGE request is an extension to SIP, it inherits all the request routing and security features of that protocol. MESSAGE requests carry the content in the form of MIME body parts. MESSAGE requests do not themselves initiate a SIP dialog; under normal usage each Instant Message stands alone, much like pager messages. MESSAGE requests may be sent in the context of a dialog initiated by some other SIP request. |
| RFC 3420 |
Internet Media Type message/sipfrag |
This document registers the message/sipfrag Multipurpose Internet Mail Extensions (MIME) media type. This type is similar to message/sip, but allows certain subsets of well formed Session Initiation Protocol (SIP) messages to be represented instead of requiring a complete SIP message. In addition to end-to-end security uses, message/sipfrag is used with the REFER method to convey information about the status of a referenced request. |
| RFC 3388 |
Grouping of Media Lines in Session Description Protocol (SDP) |
Extensions to SDP that allow grouping of media streams for lip synchronization and to represent the same content on different network addresses |
| RFC 3361 |
Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for Session Initiation Protocol (SIP) Servers |
Defines a DHCP option for locating the outbound SIP proxy server |
| RFC 3319 |
Dynamic Host Configuration Protocol (DHCPv6) Options for Session Initiation Protocol (SIP) Servers |
Defines a DHCPv6 options for locating the outbound SIP proxy server |
| RFC 3327 |
Session Initiation Protocol (SIP) Extension Header Field for Registering Non-Adjacent Contacts |
Defines the Path header field that registers a list of proxies between the UA and the registrar |
| RFC 3326 |
The Reason Header Field for the Session Initiation Protocol (SIP) |
For creating services, it is often useful to know why a Session Initiation Protocol (SIP) request was issued. This document defines a header field, Reason, that provides this information. The Reason header field is also intended to be used to encapsulate a final status code in a provisional response. This functionality is needed to resolve the "Heterogeneous Error Response Forking Problem", or HERFP. |
| RFC 3325 |
Private Extensions to the Session Initiation Protocol (SIP) for Asserted Identity within Trusted Networks |
Defines P-Asserted-Identity and P-Preferred-Identity header fields, allowing SIP proxies to add user identity information and callers to request privacy |
| RFC 3324 |
Short Term Requirements for Network Asserted Identity |
Defines requirements for caller identities established by network entities |
| RFC 3323 |
A Privacy Mechanism for the Session Initiation Protocol (SIP) |
Describes SIP caller privacy issues and defines the Privacy header field |
| RFC 3329 |
Security Mechanism Agreement for the Session Initiation Protocol (SIP) |
This document defines new functionality for negotiating the security mechanisms used between a Session Initiation Protocol (SIP) user agent and its next-hop SIP entity. This new functionality supplements the existing methods of choosing security mechanisms between SIP entities. |
| RFC 3313 |
Private Session Initiation Protocol (SIP) Extensions for Media Authorization |
Describes the need for Quality of Service (QoS) and media authorization and defines a Session Initiation Protocol (SIP) extension that can be used to integrate QoS admission control with call signaling and help guard against denial of service attacks. The use of this extension is only applicable in administrative domains, or among federations of administrative domains with previously agreed-upon policies, where both the SIP proxy authorizing the QoS, and the policy control of the underlying network providing the QoS, belong to that administrative domain or federation of domains. |
RFC 3312 |
Integration of Resource Management and SIP |
Framework for preconditions |
| RFC 3311 |
The Session Initiation Protocol (SIP) UPDATE Method |
This specification defines the new UPDATE method for the Session Initiation Protocol (SIP). UPDATE allows a client to update parameters of a session (such as the set of media streams and their codecs) but has no impact on the state of a dialog. In that sense, it is like a re-INVITE, but unlike re-INVITE, it can be sent before the initial INVITE has been completed. This makes it very useful for updating session parameters within early dialogs. |
RFC 3261 (Bookmarks kindly provided by Alexandre Gilles) |
SIP: Session Initiation Protocol |
Core protocol specification; obsoletes RFC 2543. |
RFC 3262 |
Reliability of Provisional Responses in the Session Initiation Protocol (SIP) |
Making 1xx responses reliable; introduces PRACK method |
RFC 3263 |
Session Initiation Protocol (SIP): Locating SIP Servers |
Describes DNS mechanisms (NAPTR, SRV) for locating SIP servers |
RFC 3264 |
An Offer/Answer Model with the Session Description Protocol (SDP) |
How SDP is used within SIP to negotiate sessions |
RFC 3265 |
Session Initiation Protocol (SIP)-Specific Event Notification |
SIP event model; defines SUBSCRIBE and NOTIFY |
| RFC 3087 |
Control of Service Context using SIP Request-URI |
Defines how the SIP URI can be used to invoke services such as voicemail |
| RFC 3050 |
Common Gateway Interface for SIP |
sip-cgi, as scripting interface |
| RFC 2976 |
The SIP INFO Method |
Defines INFO method for carrying SIP-related information |
| RFC 2848 |
The PINT Service Protocol: Extensions to SIP and SDP for IP Access to Telephone Call Services |
Defines how SIP events can be used to invoke PSTN services such as Internet call waiting |
Summary of SIP-Related Standardization Efforts
There are a number of extensions for adding features to SIP. Current drafts are listed below. Only drafts whose names start with draft-ietf-sip- and draft-ietf-sipping- are SIP (or SIPPING) working group work items, while others are individual submissions by their authors. Individual submissions may later become working group items. A draft does not have to be labeled as a WG item to be progressed.
Given the number of drafts, it may be hard to track which drafts are significant for different applications. Below, some of the efforts are summarized and pointers are provided to current drafts. All of these efforts are believed to be active. Some of the text below was contributed by Jonathan Rosenberg.
Core SIP Specification
The core SIP specification is RFC 3261, which obsoletes RFC 2543. Differences to the last Internet Draft version, bis09, are are minor. Related specifications are: RFC 3262 (Reliability of Provisional Responses in Session Initiation Protocol (SIP)), RFC 3263 (Session Initiation Protocol (SIP): Locating SIP Servers), RFC 3264 (An Offer/Answer Model with Session Description Protocol (SDP)), RFC 3265 (Session Initiation Protocol (SIP)-Specific Event Notification), and RFC 3266 (Support for IPv6 in Session Description Protocol (SDP)).
Informational Documents
Call Flows
To help implementors, a set of call flows has been published that give examples of common call setup and registration scenarios.
Guidelines for Writing SIP Extensions
A number of extensions are being proposed to add headers or methods to SIP. Extensions should follow a set of rules to maximize the chance that different extensions can coexist. The draft proposes criteria for evaluating what is and what is not a good SIP extension, and describes things all extensions need to discuss. It will eventually become a BCP RFC. This is a SIP WG work item.
SIP Through NATs and Firewalls
These drafts presents information on issues that arise in getting SIP and related multimedia services through NATs and firewalls. The work will result in an informational RFC.
SIP Enabled Services to Support the Hearing Impaired
This document outlines a set of services enabled by SIP that allow for access to voice services by people who are hearing impaired.
User Agent Configuration
SIP user agents need to determine whether to use an outbound proxy and where to send registration updates. The address of the outbound proxy can be configured manually and the registration can be sent via multicast. DHCP is an additional method for configuring this information. DHCP is used extensively to configure boot-time information in IP-connected hosts. (This is a SIP WG work item. It is currently in IESG review.)
For more sophisticated selection of proxies, the Service Location Protocol allows proxies and registrars to advertise their capabilities. In large networks, users may have a choice about the SIP server they connect to. Different servers can provide different services to their users; for example, some may support CPL execution, and others may not. Some may support IPSec, and some may not. This work defines a way in which SIP end systems can discover SIP servers providing specific capabilities. It is done through the Service Location Protocol (SLP), specified in RFC2608. To enable SIP server discovery with SLP, a template needs to be defined which basically defines the schema for SIP servers. The work will be turned into an IANA registration, as per normal SLP procedures. This will allow existing SLP servers to provide SIP server discovery.
Network Management
A SIP SNMP MIB is under development. It provides monitoring of SIP message processing, configuration, and alarms for SIP enabled user agents, gateways, and proxies. The work is preliminary and scheduled to complete towards the end of 2000.
Infrastructure Improvements
Reliable Provisional Responses
In the base SIP specification, provisional responses (100 through 199, also called informational) are transmitted on a best-effort basis, i.e., without guarantee that the client will receive a particular response. However, applications, such as PSTN interworking and for establishing preconditions on call establishment, have arisen which derive state transitions from these messages. A new method, PRACK has been defined to allow clients to request that provisional responses are retransmitted by the server until received by the client. This is a SIP WG work item and nearly complete.
Supported Header
SIP allows for extensions whereby the client can mandate that the server understand the extension in order to process the response. However, there is no way for the server to determine what features are supported by the client, so that the server can use those features in a response. A new header called Supported provides this feature. The work is complete and currently under IESG review.
Session Timer
SIP sessions exist until either side tears them down. Some proxies and end systems, however, would like to be assured that both sides are still alive and interested in participating. A session timer extension provides a simple keep-alive, based on the soft-state refresh principle. This is a SIP WG work item and nearly complete.
Service Enablers
Several drafts are proposing new service enabling capabilities to SIP. These are not services themselves, but primitives that enable groups of services.
Third-Party Call Control
A SIP user agent can set up calls between two other SIP user agents. This third-party call control makes it easy to provide services such as click-to-dial, mid-call announcements and conferences. This service does not require any protocol additions.
Caller Preferences
Calls are typically routed by the callee's proxies and end systems. The caller preferences extension describes how the caller can indicate its preferences as to how requests should be handled. These advanced routing services are enabled through the addition of new parameters that can be registered by call recipients. This is a SIP WG work item and has been stable for quite some time. preconditions has been established. One examle is reservation-based quality-of-service. There, a separate resource reservation protocol determines whether sufficient network resources are available. Only when this step succeeds should the phone ring. Similarly, ringing may be conditional on being able to set up a secure media session. This extension adds preconditions to SDP, so that session establishment can be made conditional to QoS or security establishment. It adds a new SIP method, COMET, to confirm that conditions have been met. This is a SIP WG work item that is considered stable.
Preconditions
In some cases, it is necessary to delay ringing the callee until a set of
Call Transfer
Services such as call transfer require additional methods. This extension allows one entity to request another to make a call. It enables call transfer, in addition to other services such as conferencing. This is a SIP WG work item. The basic procedure and syntax is considered stable.
PSTN Interconnection
SIP-based systems are often going to be connected to PSTN gateways. For analog and ISDN circuits, no particular additions are required, but interconnection with Signaling System #7 (SS7) requires additional protocol support to transparently interwork and bridge. Among other tasks, this set of drafts describe a new SIP method, INFO, to carry non-call-state-changing mid-call ISUP and QSIG messages across a SIP cloud as MIME attachments. There is also a draft that describes how ISUP messages and SIP messages relate to each other at a gateway.
The PSTN uses pre-call tones and announcements to provide information on call progress. This draft proposes a new response code, 183, and a simple mechanism to enable them in SIP. The work is largely complete.
Internet telephony needs to provide emergency calling, i.e., 911 calling.
Quality of Service
SIP does not reserve network resources, but can be helpful in providing. authorization, authentication and accounting (AAA), possibly in conjunction with the Open Settlement Protocol.
Presence, Events and Instant Messaging
SIP can also be easily extended to support presence and instant messaging. Voice mail notification, also known as message waiting service, is an example of using the basic event mechanism to provide a classical telephony service.
This extension may also make SIP suitable to control home appliances.
Creating SIP Services
A number of APIs and other mechanisms to provide SIP-related services have been developed, including an interface similar to the web common gateway interface (CGI), called sip-cgi, a programming language, CPL, for a limited set of features in proxies and Java servlets. In addition, there are APIs, such as JAIN and Parlay, that provide programmable services.
Servers can be configured with CPL and SIP-CGI scripts in a variety of ways. One mechanism is to upload the scripts via ">REGISTER requests from SIP user agents.
Mobile Hosts
When SIP UAs visit networks, they have a number of choices of how to interact with the local network, if at all, and where to register. Such interaction may be necessary due to firewalls and authentication.
Other Efforts
Below is an incomplete list of other SIP standardization efforts; none of them are part of the SIP WG charter.
- Alignment with the PacketCable DCS specifications;
- Exploration of applications to SIP in mobile environments;
- Enabling SIP to emulate residential phone service
- Interworking of SIP state machines and IN call models;
- Interworking with the MLPP multi-level priority specifications of military ISUP;
- Integration of QoS, policy, and signaling;
- Relationship between SIP, QoS and OSP as well as AAA architecture;
- SIP for selecting MPLS routes.
Current Documents
Last updated
04/29/2006 09:35:34 04/28/2006 08:47:09 by Henning Schulzrinne
2006年4月18日
Java中可以使用HttpURLConnection来请求WEB资源。 HttpURLConnection对象不能直接构造,需要通过URL.openConnection()来获得HttpURLConnection对象,示例代码如下: String szUrl = "http://www.ee2ee.com/"; URL url = new URL(szUrl); HttpURLConnection urlCon = (HttpURLConnection)url.openConnection();
HttpURLConnection是基于HTTP协议的,其底层通过socket通信实现。如果不设置超时(timeout),在网络异常的情况下,可能会导致程序僵死而不继续往下执行。可以通过以下两个语句来设置相应的超时: System.setProperty("sun.net.client.defaultConnectTimeout", 超时毫秒数字符串); System.setProperty("sun.net.client.defaultReadTimeout", 超时毫秒数字符串);
其中: sun.net.client.defaultConnectTimeout:连接主机的超时时间(单位:毫秒) sun.net.client.defaultReadTimeout:从主机读取数据的超时时间(单位:毫秒)
例如: System.setProperty("sun.net.client.defaultConnectTimeout", "30000"); System.setProperty("sun.net.client.defaultReadTime
Java中可以使用HttpURLConnection来请求WEB资源。 HttpURLConnection对象不能直接构造,需要通过URL.openConnection()来获得HttpURLConnection对象,示例代码如下: String szUrl = "http://www.ee2ee.com/"; URL url = new URL(szUrl); HttpURLConnection urlCon = (HttpURLConnection)url.openConnection();
HttpURLConnection是基于HTTP协议的,其底层通过socket通信实现。如果不设置超时(timeout),在网络异常的情况下,可能会导致程序僵死而不继续往下执行。可以通过以下两个语句来设置相应的超时: System.setProperty("sun.net.client.defaultConnectTimeout", 超时毫秒数字符串); System.setProperty("sun.net.client.defaultReadTimeout", 超时毫秒数字符串);
其中: sun.net.client.defaultConnectTimeout:连接主机的超时时间(单位:毫秒) sun.net.client.defaultReadTimeout:从主机读取数据的超时时间(单位:毫秒)
例如: System.setProperty("sun.net.client.defaultConnectTimeout", "30000"); System.setProperty("sun.net.client.defaultReadTimeout", "30000");
JDK 1.5以前的版本,只能通过设置这两个系统属性来控制网络超时。在1.5中,还可以使用HttpURLConnection的父类URLConnection的以下两个方法: setConnectTimeout:设置连接主机超时(单位:毫秒) setReadTimeout:设置从主机读取数据超时(单位:毫秒)
例如: HttpURLConnection urlCon = (HttpURLConnection)url.openConnection(); urlCon.setConnectTimeout(30000); urlCon.setReadTimeout(30000);
需要注意的是,笔者在JDK1.4.2环境下,发现在设置了defaultReadTimeout的情况下,如果发生网络超时,HttpURLConnection会自动重新提交一次请求,出现一次请求调用,请求服务器两次的问题(Trouble)。我认为这是JDK1.4.2的一个bug。在JDK1.5.0中,此问题已得到解决,不存在自动重发现象。out", "30000");
JDK 1.5以前的版本,只能通过设置这两个系统属性来控制网络超时。在1.5中,还可以使用HttpURLConnection的父类URLConnection的以下两个方法: setConnectTimeout:设置连接主机超时(单位:毫秒) setReadTimeout:设置从主机读取数据超时(单位:毫秒)
例如: HttpURLConnection urlCon = (HttpURLConnection)url.openConnection(); urlCon.setConnectTimeout(30000); urlCon.setReadTimeout(30000);
需要注意的是,笔者在JDK1.4.2环境下,发现在设置了defaultReadTimeout的情况下,如果发生网络超时,HttpURLConnection会自动重新提交一次请求,出现一次请求调用,请求服务器两次的问题(Trouble)。我认为这是JDK1.4.2的一个bug。在JDK1.5.0中,此问题已得到解决,不存在自动重发现象。
2006年4月14日
我们的 DW同学 发现了一个Jbuider的BUG, 文件夹不能叫 interface , 否则无法在工程资源中加入此目录.
2006年4月3日
支持Mac 基于SymbianOS的XCode插件发布 2006.04.03 来自:开发视界 wisdm
基于Symbian操作系统的Xcod插件,正如其名,是一个Xcode插件,能让你在Mac操作系统x上无需使用命令行开发 Symbian操作系统的程序。 简易介绍你所能做的:
- 输入MMP文件到Xcode项目
- 编辑设置和建立对象,正如你想在其它的Xcode项目上建立对象一样
- 工作时采用多样的SDK,如UIQ, S60, Series 80
- 建立SIS文件并通过蓝牙发送到你的Symbian操作系统手机上测试,所有这些都只是创建过程的一部分。
- 包括GCC 和所有其他专门的Symbian操作系统的工具—不需要下载或亲自编辑。
- 项目大部分是直接性工作的,即不需要对你的编码(在个人电脑上开发的)做什么改变以便在你的Mac上编辑。
- 插件是免费的。GPL提供所有资源,到下面去找:http://www.tomsci.com/xcodeplugin/
|
|
|
| | 日 | 一 | 二 | 三 | 四 | 五 | 六 |
|---|
| 26 | 27 | 28 | 29 | 30 | 31 | 1 | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | 9 | 10 | 11 | 12 | 13 | 14 | 15 | | 16 | 17 | 18 | 19 | 20 | 21 | 22 | | 23 | 24 | 25 | 26 | 27 | 28 | 29 | | 30 | 1 | 2 | 3 | 4 | 5 | 6 |
|
公告
集中关注 j2me/symbian. 移动应用/手机游戏开发 iphone added since 08/08
Now Iphone.!
镜像2:http://www.donews.net/cnsoft/
导航
统计
- 随笔: 78
- 文章: 2
- 评论: 227
- 引用: 0
常用链接
留言簿(8)
随笔分类
随笔档案
Links2me
最新评论

阅读排行榜
评论排行榜
|
|