| 1 |
Yokhana_2015 |
Effect of insoluble fiber supplementation applied at different ages on digestive organ weight and digestive enzymes of layer-strain poultry |
Yokhana, J. S.; Parkinson, G.; Frankel, T. L. |
2015 |
2015-11-14 |
PMC |
N |
PMC7107128 |
26574026.0 |
10.3382/ps/pev336 |
x1r99rlm |
0.986685 |
Kuehn_1994, Crenshaw_2017, Summers_2015, Hussein_2017 |
Hussein_2017, Gruse_2016 |
| 2 |
Crenshaw_2017 |
Effects of specialty proteins as alternatives to bovine or porcine spray-dried plasma in non-medicated diets fed to weaned pigs housed in an unsanitary environment |
Crenshaw, J. D.; Campbell, J. M.; Polo, J.; Stein, H. H. |
2017 |
2017-09-23 |
NONCOMM |
N |
PMC7107243 |
|
10.2527/tas2017.0040 |
zzol1ard |
0.956873 |
Kuehn_1994, Eppard_1982, Summers_2015, Medinsky_1982 |
Davenport_2000 |
| 3 |
Hussein_2017 |
Supplementing the feeds of layer pullets, at different ages with two different fiber sources improves immune function |
Hussein, Sherzad M.; Yokhana, Johnny S.; Frankel, Theresa L. |
2017 |
2017-03-24 |
PMC |
N |
PMC7112000 |
28371891.0 |
10.3382/ps/pex051 |
68bcq2wr |
0.880302 |
|
Yokhana_2015, Gruse_2016 |
| 4 |
Polo_2015 |
Ultraviolet Light (UV) Inactivation of Porcine Parvovirus in Liquid Plasma and Effect of UV Irradiated Spray Dried Porcine Plasma on Performance of Weaned Pigs |
Polo, Javier; Rodríguez, Carmen; Ródenas, Jesús; Russell, Louis E.; Campbell, Joy M.; Crenshaw, Joe D.; Torrallardona, David; Pujols, Joan |
2015 |
2015-07-14 |
COMM-USE |
N |
PMC4501813 |
26171968.0 |
10.1371/journal.pone.0133008 |
pyjz7yue |
0.829097 |
Kuehn_1994, Crenshaw_2017, Eppard_1982, Summers_2015, Dezfouli_2006 |
Cottingim_2017 |
| 5 |
Yin_F_2019 |
Yupingfeng polysaccharides enhances growth performance in Qingyuan partridge chicken by up‐regulating the mRNA expression of SGLT1, GLUT2 and GLUT5 |
Yin, Fuquan; Lan, Ruixia; Wu, Zhengmin; Wang, Zhijing; Wu, Haohao; Li, Zhiming; Yu, Hui; Zhao, Zhihui; Li, Hua |
2019 |
2019-04-11 |
COMM-USE |
N |
PMC6682804 |
30973212.0 |
10.1002/vms3.167 |
s4hb4fo5 |
0.762185 |
Kuehn_1994 |
Gruse_2016 |
| 6 |
Campbell_2006 |
Effect of Spray-Dried Plasma Form and Duration of Feeding on Broiler Performance During Natural Necrotic Enteritis Exposure |
Campbell, J.M.; Russell, L.E.; Crenshaw, J.D.; Koehnk, H.J. |
2006 |
2006-12-01 |
PMC |
N |
PMC7128868 |
|
10.1093/japr/15.4.584 |
otm4giyy |
0.745844 |
Kuehn_1994, Crenshaw_2017, Summers_2015, Eppard_1982, Franklin_2003 |
Berge_2009 |
| 7 |
Lunger_2006 |
Replacement of fish meal in cobia (Rachycentron canadum) diets using an organically certified protein |
Lunger, Angela N.; Craig, S.R.; McLean, E. |
2006 |
2006-06-30 |
PMC |
N |
PMC7112107 |
|
10.1016/j.aquaculture.2005.11.010 |
s8398ess |
0.709792 |
Kuehn_1994, Medinsky_1982, Crenshaw_2017, Quigley_2006 |
Vlčková_2018, Gruse_2016, Yokhana_2015 |
| 8 |
Campbell_2019 |
Impact of formaldehyde addition to spray-dried plasma on functional parameters and animal performance() |
Campbell, Joy M; Crenshaw, Joe D; Polo, Javier; Mellick, Dillon; Bienhoff, Mark; Stein, Hans H |
2019 |
2019-03-23 |
NONCOMM |
N |
PMC7107280 |
|
10.1093/tas/txz018 |
e8ahfzum |
0.669081 |
Kuehn_1994, Crenshaw_2017, Eppard_1982, Summers_2015 |
Campbell_2006, Gruse_2016 |
| 9 |
Cottingim_2017 |
Ultraviolet irradiation of spray-dried porcine plasma does not affect the growth performance of nursery pigs when compared with nonirradiated bovine plasma |
Cottingim, K. M.; Johnston, L. J.; Hilbrands, A. M.; Shurson, G. C.; Urriola, P. E. |
2017 |
2017-07-23 |
PMC |
N |
PMC7109998 |
28727088.0 |
10.2527/jas.2017.1486 |
nj4vnn4u |
0.656970 |
Kuehn_1994, Crenshaw_2017, Summers_2015, Eppard_1982, Luebbe_2019 |
Campbell_2019, Campbell_2006 |
| 10 |
Mani_2013 |
Intestinal integrity, endotoxin transport and detoxification in pigs divergently selected for residual feed intake |
Mani, V.; Harris, A. J.; Keating, A. F.; Weber, T. E.; Dekkers, J. C. M.; Gabler, N. K. |
2013 |
2013-05-23 |
PMC |
N |
PMC7109995 |
23463550.0 |
10.2527/jas.2012-6053 |
9g6dfpij |
0.647849 |
|
|
| 11 |
Odetallah_2001 |
Growth and Digestive Function of Turkeys Surviving the Poult Enteritis And Mortality Syndrome1 |
Odetallah, N. H.; Ferket, P. R.; Garlich, J. D.; Elhadri, L.; Krugert, K. K. |
2001 |
2001-08-23 |
PMC |
N |
PMC7107112 |
11495476.0 |
10.1093/ps/80.8.1223 |
pqa9zue8 |
0.601761 |
Zaremba_1993, Brückmann_2000, Crenshaw_2017 |
|
| 12 |
Olsen_2018 |
The effects of group size and subtherapeutic antibiotic alternatives on growth performance and morbidity of nursery pigs: a model for feed additive evaluation |
Olsen, Kristin M; Gabler, Nicholas K; Rademacher, Chris J; Schwartz, Kent J; Schweer, Wesley P; Gourley, Gene G; Patience, John F |
2018 |
2018-07-06 |
NONCOMM |
N |
PMC7107267 |
|
10.1093/tas/txy068 |
r6xzqu6a |
0.573485 |
Summers_2015, Crenshaw_2017, Luebbe_2019 |
Berge_2009, Vlčková_2018, Campolina_2020 |
| 13 |
Abass_2017 |
Propolis supplementation attenuates the negative effects of oxidative stress induced by paraquat injection on productive performance and immune function in turkey poults |
Abass, Ahmed O; Kamel, Nancy N; Khalifa, Walaa H; Gouda, G F; El-Manylawi, M A F; Mehaisen, Gamal M K; Mashaly, Magdi M |
2017 |
2017-10-05 |
PMC |
N |
PMC7107162 |
29053856.0 |
10.3382/ps/pex248 |
1hf8vyhz |
0.548505 |
Medinsky_1982, Crenshaw_2017, Kuehn_1994 |
Gruse_2016 |
| 14 |
Saeed_2018 |
16S ribosomal RNA sequencing reveals a modulation of intestinal microbiome and immune response by dietary L-theanine supplementation in broiler chickens |
Saeed, Muhammad; Yatao, Xu; Tiantian, Zhang; Qian, Ren; Chao, Sun |
2018 |
2018-08-30 |
PMC |
N |
PMC7107316 |
30169691.0 |
10.3382/ps/pey394 |
ctmn3957 |
0.505688 |
|
Khan_2018 |
| 15 |
Curry_2018 |
Porcine epidemic diarrhea virus reduces feed efficiency in nursery pigs |
Curry, S M; Burrough, E R; Schwartz, K J; Yoon, K J; Lonergan, S M; Gabler, N K |
2018 |
2018-01-01 |
PMC |
N |
PMC6140930 |
29378029.0 |
10.1093/jas/skx005 |
a6apftnp |
0.456389 |
Crenshaw_2017, Kuehn_1994 |
|
| 16 |
Medinsky_1982 |
Development of hepatic lesions in male Fischer-344 rats fed AIN-76A purified diet |
Medinsky, M.A.; Popp, J.A.; Hamm, T.E.; Dent, J.G. |
1982 |
1982-01-31 |
PMC |
N |
|
7064147.0 |
10.1016/0041-008x(82)90107-7 |
r623k00d |
0.414273 |
Kuehn_1994, Crenshaw_2017, Eppard_1982, Franklin_2003 |
|
| 17 |
Che_T_2012 |
Mannan oligosaccharide increases serum concentrations of antibodies and inflammatory mediators in weanling pigs experimentally infected with porcine reproductive and respiratory syndrome virus(,)(2) |
Che, T. M.; Song, M.; Liu, Y.; Johnson, R. W.; Kelley, K. W.; Van Alstine, W. G.; Dawson, K. A.; Pettigrew, J. E. |
2012 |
2012-08-23 |
PMC |
N |
PMC7110021 |
22367071.0 |
10.2527/jas.2011-4518 |
supdzy06 |
0.305647 |
|
|
| 18 |
Er_C_2014 |
Adverse effects of Influenza A(H1N1)pdm09 virus infection on growth performance of Norwegian pigs - a longitudinal study at a boar testing station |
Er, Chiek; Lium, Bjørn; Tavornpanich, Saraya; Hofmo, Peer Ola; Forberg, Hilde; Hauge, Anna Germundsson; Grøntvedt, Carl Andreas; Framstad, Tore; Brun, Edgar |
2014 |
2014-12-04 |
COMM-USE |
N |
PMC4300606 |
25472551.0 |
10.1186/s12917-014-0284-6 |
m35szlis |
0.302135 |
Kuehn_1994, Luebbe_2019, Summers_2015, Dezfouli_2006 |
|


--- layout: default ---
MRC Human Genetics Unit,
Institute of Genetics and Cancer, University of Edinburgh, Western General Hospital, Crewe Road, EH4 2XY, Edinburgh, United Kingdom


source file: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/s3transfer/delete.py
file stats: 19 lines, 7 executed: 36.8% covered
1. # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2. # 3. # Licensed under the Apache License, Version 2.0 (the "License"). You 4. # may not use this file except in compliance with the License. A copy of 5. # the License is located at 6. # 7. # http://aws.amazon.com/apache2.0/ 8. # 9. # or in the "license" file accompanying this file. This file is 10. # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11. # ANY KIND, either express or implied. See the License for the specific 12. # language governing permissions and limitations under the License. 13. from s3transfer.tasks import Task 14. from s3transfer.tasks import SubmissionTask 15. 16. 17. class DeleteSubmissionTask(SubmissionTask): 18. """Task for submitting tasks to execute an object deletion.""" 19. 20. def _submit(self, client, request_executor, transfer_future, **kwargs): 21. """ 22. :param client: The client associated with the transfer manager 23. 24. :type config: s3transfer.manager.TransferConfig 25. :param config: The transfer config associated with the transfer 26. manager 27. 28. :type osutil: s3transfer.utils.OSUtil 29. :param osutil: The os utility associated to the transfer manager 30. 31. :type request_executor: s3transfer.futures.BoundedExecutor 32. :param request_executor: The request executor associated with the 33. transfer manager 34. 35. :type transfer_future: s3transfer.futures.TransferFuture 36. :param transfer_future: The transfer future associated with the 37. transfer request that tasks are being submitted for 38. """ 39. call_args = transfer_future.meta.call_args 40. 41. self._transfer_coordinator.submit( 42. request_executor, 43. DeleteObjectTask( 44. transfer_coordinator=self._transfer_coordinator, 45. main_kwargs={ 46. 'client': client, 47. 'bucket': call_args.bucket, 48. 'key': call_args.key, 49. 'extra_args': call_args.extra_args, 50. }, 51. is_final=True 52. ) 53. ) 54. 55. 56. class DeleteObjectTask(Task): 57. def _main(self, client, bucket, key, extra_args): 58. """ 59. 60. :param client: The S3 client to use when calling DeleteObject 61. 62. :type bucket: str 63. :param bucket: The name of the bucket. 64. 65. :type key: str 66. :param key: The name of the object to delete. 67. 68. :type extra_args: dict 69. :param extra_args: Extra arguments to pass to the DeleteObject call. 70. 71. """ 72. client.delete_object(Bucket=bucket, Key=key, **extra_args)


#include <db_cxx.h>int DbMpoolFile::close();
The DbMpoolFile::close method closes the source file indicated by the DbMpoolFile object. Calling DbMpoolFile::close does not imply a call to DbMpoolFile::sync, i.e. no pages are written to the source file as as a result of calling DbMpoolFile::close.
In addition, if the file argument to DbMpoolFile::open was NULL, any underlying files created for this DbMpoolFile will be removed.
The DbMpoolFile::close method either returns errno or throws an exception that encapsulates an errno on failure, and 0 on success.
The DbMpoolFile::close method may fail and throw an exception for any of the errors specified for the following Berkeley DB and C library functions: abort(3), close(3), fcntl(3), fflush(3), fprintf(3), free(3), getpid(3), memset(3), munmap(3), strerror(3), vfprintf(3), and vsnprintf(3).


{{Infobox prepared food | name = Couque suisse | image = | caption = | alternate_name = | country = | region = | creator = | course = | type = Sweet roll | served = | main_ingredient = | variations = | calories = | other = }}
{{unreferenced|date=March 2009}}
A couque suisse is a viennoiserie sweet roll, somewhat similar to a Danish. Couques suisses are available internationally. They are also similar to Belgian buns.
{{dessert-stub}}


Frameworks are good stuff, at least for middle to big enterprise applications. One doesn’t want to reinvent the wheel. Aspects like security, caching, monitoring are hard and it’s easy to get them wrong if implemented from scratch.
On the other hand, there are valid use cases where you probably don’t need all this advanced stuff. Examples can be a personal webpage, blog, product catalog etc.
For a lot of simple cases a static web generator is the right way to go, but you do want something interactive on your web like search, form or comments, a static page is just not enough, but a framework could be a bit overkill.
Let’s give it a try! We will build a minimalist MVC framework from scratch. The requirement: clean MVC architecture, declarative routing, extreme simplicity. Can we push it under 16KB? Challenge accepted!
Routing should be as lucid and declarative as possible. Potentially, we can have a lot of routes and if we had to write too much code the routing would easily become a mess.
All requests must go through a singleton Dispatcher. The instance of the Dispatcher is created in the application bootstrap (index.php
) together with the routing.
The dispatcher uses internally a singleton object Router:
// mvc/Dispatcher.php
class Router {
// 'METHOD path' => action
private $routing = [];
}
The Router holds the routing rules as an array with paths as keys and actions as values. Actions are functions to be executed when the request matches the path.
HTTP method is optional, GET
will be used as default.
For dynamically generated pages we need to parse path parameters as well. We can define a parameter in the path string inside curly brackets. The action must then be called with an associative array of the parameter names and values.
Here are some examples of routing rules:
[ '/' => function() { ...}, 'POST /abc'=> function() { ... }, '/abc'=> function() { … }, '/abc/{id}'=> function($params) { … }, 'GET /abc/{id}/xyz'=> function($params) { … }, '/abc/{id1}/xyz/{id2}'=> function($params) { … } ]
Looks pretty neat, easy to create, easy to read. All what we want.
In the Router API we need a function for adding a route and a function to actually process the route upon a request. The former should be easy:
// mvc/Dispatcher.php
class Router {
private $routing = [];
function addRouting($pattern, $action) {
$this->routing[$pattern] = $action;
}
}
The latter forms the main functionality of the Router. We iterate through the routes until one doesn’t match the request. Otherwise, we return HTTP code 404
and execute, let’s say, the root route (/
):
// mvc/Dispatcher.php
class Router {
private $routing = [];
function addRouting($pattern, $action) { … }
function route($method, $path, $params) {
$path = "{$method} /{$path}";
foreach ($this->routing as $pattern => $handler) {
// route parameters as regex
$patternParams = $this->patternParams($pattern);
if (!empty($patternParams)) {
$pattern = $this->withParams($pattern);
}
// add GET into the pattern if necessary
$pattern = $this->withMethod($pattern);
// if the request matches, $params array is filled
if ($this->requestMatches(
$pattern, $path, $patternParams, $params)) {
$handler($params); // execute action
return;
}
}
http_response_code(404);
$this->route['/']([]);
}
}
Private functions patternParams
, withParams
, withMethod
and requestMatches
are straightforward and uninteresting (the full source code is provided in the link below) - the idea is clear.
Now, we can use the Router in the implementation of our Dispatcher. The Dispatcher doesn’t do much more than that it parses the request and delegate it to the Router:
// mvc/Dispatcher.php
class Dispatcher {
private $router;
function __construct() {
$this->router = new Router();
}
function dispatch() {
$this->router->route(
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_REQUEST);
}
}
As we probably don’t want to access the Router directly, we need to expose a delegating function for adding a route:
// mvc/Dispatcher.php
class Dispatcher {
private $router;
function __construct() { … }
function dispatch() { … }
function routing($pattern, $action) {
$this->router->addRouting($pattern, $action);
return $this;
}
}
Alright, the routing and dispatching is ready. Let’s give it a try:
// index.php
(new Dispatcher())
->routing('/hello/{user}', function($params) {
echo "Hello, {$params['user']}!";
})
->dispatch();
curl http://localhost:8080/hello/user123 Hello, user123!
It works! Now, we will implement the MVC pattern.
The very first idea behind PHP was to have a simple language for templating. Nowadays, PHP is used for almost everything, but templating. Until now: we will create a simple HTML template in PHP, just like this:
// views/layouts/html.php
<!doctype html>

<title>Minimalist MVC Framework</title>
<meta charset="utf-8">

<?= $this->content() ?>

© <?= date('Y') ?> by PHP

Similarly, we can think of another template, such as XML:
// views/layouts/xml.php
<?php
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo $this->content();
Simple enough, nah?
That was the layout page, the content of particular views will be rendered into it. A concrete View could look like following:
// views/hello.php

Hello, <?= $this->user ?>!

Make yourself at home.

Each View needs a name, type (html
, xml
, json
,etc) and a Model, where the data to render lives:
// mvc/ModelView.php
class ModelView {
private $name;
private $model;
private $type;
public function __construct($name, $model, $type = 'html') {
$this->name = $name;
$this->model = $model;
$this->type = $type;
}
final function render() {
switch ($this->type) {
case 'xml':
header('Content-type: text/xml; charset=UTF-8');
break;
case 'json':
header("Content-Type: application/json; charset=UTF-8");
break;
default:
header("Content-Type: text/html; charset=UTF-8");
}
require_once "./layout/{$this->type}.php";
}
final function content() {
ob_start();
require_once "./views/{$this->name}.php";
$out = ob_get_contents();
ob_end_clean();
return $out;
}
function __get($key) {
return isset($this->model[$key])
? $this->model[$key]
: "__{$key}__";
}
}
The View is read from a file by the name, model attributes are retrieved by the View code via the getter function. The class ModelView
is used by the Controller as we will see next.
The role of a Controller is to validate user input, call the domain logic, fill the View Model and render the View. The Controller is an abstract class meant to be extended by custom actions controllers:
// mvc/Controller.php
abstract class Controller {
private $model = [];
function render($name, $type = 'html') {
return new ModelView($name, $this->model, $type);
}
function addModelAttribute($key, $value) {
$this->model[$key] = $value;
}
}
A custom controller could look as follows:
// controllers/HelloController.php
class HelloController extends Controller {
function sayHello($params) {
$this->addModelAttribute('user', $params['user']);
$this->render('hello');
}
}
As the last, we have use our HelloController
in the routing definition:
// index.php
(new Dispatcher())
->routing('/hello/{user}', function($params) {
(new HelloController())->sayHello($params);
})
->dispatch();
curl http://localhost:8080/hello/user123 <!doctype html>   <title>Minimalist MVC Framework</title> <meta charset="utf-8">
Hello, user123!

Make yourself at home.
   © 2020 by PHP
We’re done. The final size of the framework source code is 4.1 KB. We did it!
We’ve implemented a minimalist super-performant MVC framework using only vanilla PHP. The focus was simplicity, ease of use, separation of concerns.
In less than 5 KB we have achieved to create a simple request dispatcher with declarative routing and base classes for extending when implementing custom actions. Custom application code, domain logic and the framework are fully separated and being touched only on the boundaries.
The working source code is on my GitHub.
Thanks for reading!


How to mount an additional Elastic Block Store Linux
I needed to add an elastic block store to a Ubuntu Linux Server. I created the instance from with the AWS admin console. What was missing was how to have the Ubuntu instance recognize it. Turns out it is fairly simple. Format, and mount.
Mount
SSH into the instance and become root.
\$ ssh ubuntu@my-server
\$ sudo su
Find the new volume's name
\$ fdisk -l
Disk /dev/xvda1: 8589 MB,<PHONE_NUMBER> bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 \* 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/xvda1 doesn't contain a valid partition table
Disk /dev/xvdf: 107.4 GB,<PHONE_NUMBER>00 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 \* 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/xvdf doesn't contain a valid partition table
In my case it's "/dev/xvdf"
We'll need to format the volume.
\$ mkfs -t ext3 /dev/xvdf
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
6553600 inodes, 26214400 blocks
1310720 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
800 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
Now to mount it
\$ mkdir /mnt/ebs-volume-1
\$ mount /dev/xvdf /mnt/ebs-volume-1/


C++ API¶
Class Hierarchy¶
-
- Namespace G2lib
- Class AABBtree
- Class AsyPlot
- Class BaseCurve
- Class BBox
- Class Biarc
- Class BiarcList
- Class CircleArc
- Class ClothoidCurve
- Class ClothoidList
- Class ClothoidSplineG2
- Class G2solve2arc
- Class G2solve3arc
- Class G2solveCLC
- Class LineSegment
- Class PolyLine
- Class Solve2x2
- Class Triangle2D
- Enum CurveType
- Namespace G2lib
File Hierarchy¶
-
- Directory Clothoids
- File AABBtree.hxx
- File BaseCurve.hxx
- File BaseCurve_using.hxx
- File Biarc.hxx
- File BiarcList.hxx
- File Circle.hxx
- File Clothoid.hxx
- File ClothoidAsyPlot.hxx
- File ClothoidList.hxx
- File Fresnel.hxx
- File G2lib.hxx
- File Line.hxx
- File PolyLine.hxx
- File Triangle2D.hxx
- File AABBtree.cc
- File Biarc.cc
- File BiarcList.cc
- File Circle.cc
- File Clothoid.cc
- File ClothoidAsyPlot.cc
- File ClothoidDistance.cc
- File ClothoidG2.cc
- File ClothoidList.cc
- File Clothoids.hh
- File Fresnel.cc
- File G2lib.cc
- File G2lib_intersect.cc
- File Line.cc
- File PolyLine.cc
- File Triangle2D.cc
- Directory Clothoids


--- layout: post status: publish published: true title: Computer Science from the Bottom Up author: display_name: vishvendra login: vishvendra email<EMAIL_ADDRESS>url: '' author_login: vishvendra author_email<EMAIL_ADDRESS>wordpress_id: 418 wordpress_url: https://vishvendrasingh.com/?p=418 date: '2016-12-25 05:12:43 +0530' date_gmt: '2016-12-25 05:12:43 +0530' categories: - Computer Science tags: [] comments: [] ---
Hi, read my post Computer Science from the Bottom Up


Analysis of XSEDE Publications
Report generated at {{ now.strftime('%H:%M') }} on {{ now.strftime('%Y-%m-%d') }}


LETS PLAY PIG!


14.9 The statvfs Module
The statvfs module, used in Example 14-11, contains a number of constants and test functions that can
be used with the optional os.statvfs function,
which returns information about a filesystem.
Example 14-11.


This shows how to set the isolation level to lock your transaction to a single point in time, isolating you from other people's updates.
When running this demo, add one extra parameter "reader" or "writer".
Run this demo in several windows. In the first, run as "writer". Then in several other windows, run as "reader".
"Oracle also offers the option of enforcing transaction-level read consistency. When a transaction runs in serializable mode, all data accesses reflect the state of the database as of the time the transaction began. This means that the data seen by all queries within the same transaction is consistent with respect to a single point in time, except that queries made by a serializable transaction do see changes made by the transaction itself. Transaction-level read consistency produces repeatable reads and does not expose a query to phantoms."
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm
import time if role == 'writer': # this code loops and sets the value to 1,2,3,... curs.execute("delete from isolation_demo"); curs.execute("insert into isolation_demo(x) values(0)"); while True: curs.execute('select x from isolation_demo') print time.asctime(),curs.fetchall() curs.execute('update isolation_demo set x=x+1') conn.commit() time.sleep(1) else: # this code loops and prints the current value in the table. # because it has set the isolation level, all queries are # "locked" in time and will not be affected by other processes # modifying the database. # read only mode is similar to serializable mode, but all # data modifications are disallowed and will throw errors. curs.execute('set transaction read only') #curs.execute('set transaction isolation level serializable') while True: curs.execute('select x from isolation_demo') print time.asctime(),curs.fetchall() time.sleep(1)
The writer window will count from 1,2,3.... Each reader window will show the value consistent from the beginning of the transaction.
create table isolation_demo(x number);
drop table isolation_demo;


Logging into websites is no longer a matter of typing in your username and password and clicking the login button. If you already have an account with the main social networks you can log into a site using your credentials from that website saving you having to register your details again. This obviously makes things a bit easier as you don’t have to remember another password. (Although you should all be using a password manager such as LastPass.)
There are currently providers out there that allow you to use their services to integrate into your website to provide authentication via the social networks. The main two that I know of are Janrain and DotNetOpenAuth. I’ve not worked with DotNetOpenAuth but I have with Janrain when building DinnerParty.
The process was reasonably easy but not as simple as it could be.
I was made aware of an OSS project by @philliphaydon whilst keeping up to speed with the latest NancyFX goings on in Jabbr that aims to provide a simple way of using social networks to log into a site.
It started out aimed at ASP.Net MVC but after a bit of arm bending from @philliphaydon it was refactored to be web framework agnostic so it could be used with NancyFX .
Being enthusiastic, I asked if any help was needed and I ended up making a simple demo website using NancyFX
Let me see some code I hear you say so here we go:
Bootstrapper:
public class Bootstrapper : DefaultNancyBootstrapper
{
private const string TwitterConsumerKey = "Rb7qNNPUPsRSYkznFTbF6Q";
private const string TwitterConsumerSecret = "pP1jBdYOlmCzo08QFJjGIHY4YSyPdGLPO2m1q47hu9c";
private const string FacebookAppId = "159181340893340";
private const string FacebookAppSecret = "97c4e4d0fa548232cf8f9c68a7adcff9";
private const string GoogleConsumerKey = "587140099194.apps.googleusercontent.com";
private const string GoogleConsumerSecret = "npk1_gx-gqJmLiJRPFooxCEY";
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
{
RegisterAuthenticationProviders(container);
base.ApplicationStartup(container, pipelines);
CookieBasedSessions.Enable(pipelines);
}
private static void RegisterAuthenticationProviders(TinyIoCContainer container)
{
Condition.Requires(container).IsNotNull();
var twitterProvider = new TwitterProvider(TwitterConsumerKey, TwitterConsumerSecret,
new Uri(
"http://localhost:6969/AuthenticateCallback?providerKey=Twitter"));
var facebookProvider = new FacebookProvider(FacebookAppId, FacebookAppSecret,
new Uri(
"http://localhost:6969/AuthenticateCallback?providerKey=facebook"));
var googleProvider = new GoogleProvider(GoogleConsumerKey, GoogleConsumerSecret,
new Uri(
"http://localhost:6969/AuthenticateCallback?providerKey=google"));
var authenticationService = new AuthenticationService();
authenticationService.AddProvider(twitterProvider);
authenticationService.AddProvider(facebookProvider);
authenticationService.AddProvider(googleProvider);
container.Register(authenticationService);
}
}
HomeModule
public class HomeModule : NancyModule
{
private const string SessionGuidKey = "GUIDKey";
public HomeModule(IAuthenticationService authenticationService)
{
Get["/"] = parameters => View["login"];
Get["/RedirectToAuthenticate/{providerKey}"] = parameters =>
{
Session[SessionGuidKey] = Guid.NewGuid();
Uri uri =
authenticationService.
RedirectToAuthenticationProvider(
parameters.providerKey,
Session[SessionGuidKey].ToString());
return Response.AsRedirect(uri.AbsoluteUri);
};
Get["/AuthenticateCallback"] = parameters =>
{
if (string.IsNullOrEmpty(Request.Query.providerKey))
{
throw new ArgumentNullException("providerKey");
}
// It's possible that a person might hit this resource directly, before any session value
// has been set. As such, we should just fake some state up, which will not match the
// CSRF check.
var existingState = (string)(Session[SessionGuidKey] ?? Guid.NewGuid().ToString());
var model = new AuthenticateCallbackViewModel();
var querystringParameters = new NameValueCollection();
foreach (var item in Request.Query)
{
querystringParameters.Add(item, Request.Query[item]);
}
try
{
model.AuthenticatedClient =
authenticationService.CheckCallback(Request.Query.providerKey,
querystringParameters,
existingState);
}
catch (Exception exception)
{
model.Exception = exception;
}
return View["AuthenticateCallback", model];
};
}
}
This should hopefully be pretty self explanatory as that is the aim of the game but I will go through it.
Firstly we need to setup our social network key and secret which was provided to us by registering an app at the relevant site. We then setup a IAuthenticationProvider class for Twitter, Google & Facebook with the key, secret and callback URL that the social network will make request to after login. We then register our providers with a IAuthenticationService class.
We then setup our IOC container to use authenticationService so that when our modules like Home take a dependency of IAuthenticationService it will use that.
Our root route provides a login page with hyperlinks to the RedirectToAuthenticate route. For example, using Twitter it will be http://mydomain.com/RedirectToAuthenticate/Twitter.
We create an item in our session so that it can be retrieved later when Twitter calls the callback URL. This is so we can validate(if needs be) that its a valid request and not some cheeky hacker. We then use the IAuthenticationService to redirect to the social network login page based on the value of providerKey argument. This could also be Facebook or Google.
The user is redirected to Twitter and logs in and then gets directed back to our website.
Our AuthenticateCallback route then creates a NameValueCollection from the querystring parameters and passes the providerKey (Twitter,Facebook,Google), NameValueCollection and Session value to the IAuthenticationService to validate all is ok.
If so it creates a view model and passes it to the view and in this example shows us the logged in user’s details.
I think that was pretty simple.
The source code is over at Github and is written by Pure.Krome or Lara Eagle if you prefer (same person). It’s also available on Nuget. Its name you ask? World-Domination.Web.Authentication


Ingson.net exists to provide information and a learning experience for HTML, CSS, JAVASCRIPT, PHP, MySQL, and more.
VISIT SOCIAL MEDIA:
CONTACT US:
VISIT ABOUT:


Spotify Data Analysis
Enter a Song and Artist Name:
Song
Artist
Regions Most Popular
Countries for this Popularity
| United States |
65% |
| UK |
15.7% |
| Russia |
5.6% |
| Spain |
2.1% |
| India |
1.9% |
| France |
1.5% |
Demographic Facts
Language
Country
Artist Stats
Name
Country
Music Genre


--- title: Modern GPU layout: post ---
Modern GPU is a set of GPU computing programs and companion articles. The articles form a tutorial and cover the programs as case studies. GPGPU literature has avoided coverage of functions requiring complex inter-thread communication, favoring algorithms that have obvious parallelizations. But these are not the most interesting problems in this emerging field.


Today Cash Drawer Report
| Date |
|
| Starting Cash |
|
|---|---|
| Orders Balance |
|
| End of the Day Balance |
|
| Actual Cash |
|
| Change in the Balance |
|
| Comment |
|
Cash Report History
Cash Drawer Report
| Date | Starting Cash | Orders Balance | End of the Day Balance | Actual Cash | Change in the Balance | Comment |
|---|---|---|---|---|---|---|
| {{cd.date | date : "yyyy-MM-dd" }} | Rs.{{cd.startingCash}} | Rs.{{cd.ordersBalance}} | Rs.{{cd.endOfTheDayBalance}} | Rs.{{cd.actualCash}} | Rs.{{cd.balanceChange}} | {{cd.comment}} |


Preparation time
30 mins to 1 hour
Cooking time
over 2 hours
Serves
Serves 4
Dietary
A great dessert for a dinner party. You can make the components well in advance and assemble just before serving with a flourish.
For the sabayon, whisk the egg yolks, wine, sugar and lemon juice in a medium bowl for one minute. Place the bowl over a pan of barely-simmering water and whisk constantly for 7-8 minutes until the sabayon is light and fluffy. Set the bowl over a larger bowl filled with ice and continue whisking to chill the sauce. Cover the sauce with clingfilm and refrigerate overnight.
For the shortbread, place the egg yolks and sugar in the bowl of a food mixer fitted with the paddle attachment. Mix on a high speed for four minutes until the mixture is very pale and doubled in volume. Reduce the speed to minimum, add the flour, baking powder and salt and mix for two minutes. Add the butter, mix for one more minute then scrape the dough onto a baking tray lined with greaseproof paper. Cover the tray with clingfilm and place in the fridge for 35 minutes for the dough to stiffen.
Preheat the oven to 160C/310F/Gas 2½. Roll the dough between two sheets of greaseproof paper to a thickness of 3mm/⅛in. Place the dough on a baking tray and transfer to the freezer for 15 minutes. Remove the top layer of greaseproof paper, cut the dough into four rectangles 5cm x 15cm/2in x 6in and place on a greased baking tray. Bake for six minutes until golden-brown then remove from the oven and trim the edges of the shortbread to make a neat finish. Set aside to cool.
Meanwhile, place the plums, sugar, plum liqueur and lemon juice in a bowl and set aside to macerate for one hour. Cut eight of the plum halves into quarters and set aside. Place the remaining plum halves and the macerating liquid into a pan and bring to a boil. Remove the pan from the heat, add the quartered plums and allow cool to room temperature.
To serve, place the plum halves together to reform into whole plums. Place a shortbread biscuit on each plate and top with three plums. Spoon the quartered plums around and top with a spoonful of the sabayon. Dust the surface with icing sugar twice and gently caramelise with a blow torch.


The Rotative Shapes' Dance
Lab Work 1 (Rotative Shapes' Dance)
Authors/Contributors
Rúben André Barreiro
Instructions
- Click anywhere in the canvas to create a Rotative Shape;
- Choose the current Shape's color, by adjusting the colors' factors;
- Choose the current Geometric Shape in use;
- Choose the option to allow Blur Edges;
- Choose the current direction (Clock Direction or the opposite) of the Geometric Shape;


FOI release
A Freedom of Information disclosure regarding free school additional funding.
Please tell me how much each of the free schools that opened in autumn 2011 received from the Department for Education in additional funding (i.e. funding that was in addition to per-pupil funds).
A number of free schools which opened have received start-up funding in addition to their per-pupil funding. Start-up funding is not usually paid to existing independent schools becoming free schools unless there are exceptional circumstances.
Start-up funding is not just provided to free schools, it is imperative for the success of any new state school. In 2011 local authorities provided start-up funding for primary schools at a level at least comparable with free schools in the same year, where funding ranged from £190,000 up to £492,000. The department has also provided funding for new secondary academies. For example: the King Solomon Academy (opened 2007), the Brent Academy (opened 2008), the Wren Academy (2008) and The City Academy, Hackney (opened 2009) all received between £634,000 and £1,374,820 of start-up funding during their first year of opening.
The funding is designed to enable schools to cover essential initial costs, such as buying books and equipment; and to meet the costs arising as the school builds up its pupil numbers over time - as they could not otherwise meet the full cost of a headteacher and other senior staff from the per pupil funding initially received. This funding is essential to meet the additional costs associated with starting a brand new school.
Levels of start up funding received by schools vary according to the specific circumstances of individual schools, which include a number of different factors such as the size of the school, the staffing structure and relationships with existing schools which may enable savings to be made through the sharing of services.
In determining the amount of start-up free schools receive we have sought to achieve best value for money and to reduce the overall costs of setting up a new school. Start-up funding given to free schools in 2011/12 demonstrates funding is at a level at least comparable with maintained schools and far less than has been given to new academies in previous years.
The start up funding allocated to each of the 24 open free schools for the academic year 2011/12 is shown in the table below:
| School | Phase | Start-up funding 2011/12 (rounded) |
|---|---|---|
| Aldborough E-ACT Free School | Primary | £199,000 |
| All Saint's Junior School | Primary | £81,000 |
| ARK Atwood Primary Academy | Primary | £141,000 |
| ARK Conway Primary Academy | Primary | £154,000 |
| Batley Grammar School | All through | £0 |
| Bristol Free School | Secondary | £303,000 |
| Canary Wharf College | Primary | £98,000 |
| Discovery New School | Primary | £63,000 |
| Eden Primary School | Primary | £98,000 |
| Etz Chaim Jewish Primary School | Primary | £274,000 |
| Kings Science Academy | Secondary | £601,000 |
| Krishna-Avanti Primary School | Primary | £163,000 |
| Langley Hall Primary Academy | Primary | £215,000 |
| Maharishi School | All through | £24,000 |
| Moorlands Free School | Primary | £0 |
| Nishkam Free School | Primary | £137,000 |
| Priors Free School | Primary | £0 |
| Rainbow Primary School | Primary | £126,000 |
| Sandbach School | Secondary | £0 |
| St Luke's Church of England Primary School | Primary | £131,000 |
| Stour Valley Community School | Secondary | £493,000 |
| The Free School, Norwich | Primary | £76,000 |
| West London Free School | Secondary | £239,000 |
| Woodpecker Hall Primary School | Primary | £76,000 |


The Modem Connection Card dialog box allows you to specify what type of modem you have and how it is connected to your computer.
This is a Hot Spot image. Move your mouse pointer over the image
and when the mouse pointer changes to the shape of a hand click
the left mouse button once for extra help.
Select your modem from the Modem list, choose which of your ports it's connected to from the Port list and the speed of your modem from the Speed list.
If your not sure about your modem or the settings required for it, click the AutoDetect button. This will run tests to determine what modem you have and set Ameol to an appropriate modem configuration.


--- layout: post title: iOS App for Google+ categories: [] tags: - apple - geek - google - ios - social - technology status: publish type: post published: true meta: _original_post_id: '' _original_import_author: John Duprey author: ---
Yay! iOS app for Google+! They say if you search for "google huddle" you can find it. Or click here: http://itunes.apple.com/us/app/google/id447119634?mt=8


Support¶
We have several free and commercial support and consulting options for IdentityServer.
Free support¶
Free support is community-based and uses public forums
StackOverflow
There’s an ever growing community of people using IdentityServer that monitor questions on StackOverflow. If time permits, we also try to answer as many questions as possible
You can subscribe to all IdentityServer4 related questions using this feed:
https://stackoverflow.com/questions/tagged/?tagnames=identityserver4&sort=newest
Please use the IdentityServer4
tag when asking new questions
Gitter
You can chat with other IdentityServer4 users in our Gitter chat room:
https://gitter.im/IdentityServer/IdentityServer4
Reporting a bug
If you think you have found a bug or unexpected behavior, please open an issue on the Github issue tracker. We try to get back to you ASAP. Please understand that we also have day jobs, and might be too busy to reply immediately.
Also check the contribution guidelines before posting.
Commercial support¶
We are doing consulting, mentoring and custom software development around identity & access control architecture in general, and IdentityServer in particular. Please get in touch with us to discuss possible options.
Training
We are regularly doing workshops around identity & access control for modern applications. Check the agenda and upcoming public dates here. We can also perform the training privately at your company. Contact us to request the training on-site.
Admin UI, Identity Express and SAML2p support
There are a couple of commercial add-on products available from our partners, check https://www.identityserver.com/products/.


|
QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.30
|
Tree-based lattice-method base class. More...
#include <ql/methods/lattices/lattice.hpp>
Public Member Functions | |
| TreeLattice (const TimeGrid &timeGrid, Size n) | |
| Public Member Functions inherited from Lattice | |
| Lattice (TimeGrid timeGrid) | |
| virtual | ~Lattice ()=default |
| const TimeGrid & | timeGrid () const |
| virtual Array | grid (Time) const =0 |
Lattice interface | |
| std::vector< Array > | statePrices_ |
| Size | n_ |
| Size | statePricesLimit_ |
| void | initialize (DiscretizedAsset &, Time t) const override |
| initialize an asset at the given time. More... | |
| void | rollback (DiscretizedAsset &, Time to) const override |
| void | partialRollback (DiscretizedAsset &, Time to) const override |
| Real | presentValue (DiscretizedAsset &) const override |
| Computes the present value of an asset using Arrow-Debrew prices. More... | |
| const Array & | statePrices (Size i) const |
| void | stepback (Size i, const Array &values, Array &newValues) const |
| void | computeStatePrices (Size until) const |
Additional Inherited Members | |
| Protected Member Functions inherited from CuriouslyRecurringTemplate< Impl > | |
| CuriouslyRecurringTemplate ()=default | |
| ~CuriouslyRecurringTemplate ()=default | |
| Impl & | impl () |
| const Impl & | impl () const |
| Protected Attributes inherited from Lattice | |
| TimeGrid | t_ |
Tree-based lattice-method base class.
This class defines a lattice method that is able to rollback (with discount) a discretized asset object. It will be based on one or more trees.
Derived classes must implement the following interface:
and may implement the following:
Definition at line 57 of file lattice.hpp.
| TreeLattice | ( | const TimeGrid & | timeGrid, |
| Size | n | ||
| ) |
Definition at line 60 of file lattice.hpp.
|
overridevirtual |
initialize an asset at the given time.
Implements Lattice.
Definition at line 127 of file lattice.hpp.
|
overridevirtual |
Roll back an asset until the given time, performing any needed adjustment.
Implements Lattice.
Reimplemented in TsiveriotisFernandesLattice< T >.
Definition at line 134 of file lattice.hpp.
|
overridevirtual |
Roll back an asset until the given time, but do not perform the final adjustment.
with the two statements:
Implements Lattice.
Reimplemented in TsiveriotisFernandesLattice< T >.
Definition at line 140 of file lattice.hpp.
|
overridevirtual |
Computes the present value of an asset using Arrow-Debrew prices.
Implements Lattice.
Definition at line 121 of file lattice.hpp.
Definition at line 114 of file lattice.hpp.
Definition at line 167 of file lattice.hpp.
|
protected |
Definition at line 98 of file lattice.hpp.
|
mutableprotected |
Definition at line 87 of file lattice.hpp.
|
private |
Definition at line 90 of file lattice.hpp.
|
mutableprivate |
Definition at line 91 of file lattice.hpp.


TABLE OF INTERACTIONS WITH
PILOCARPINE
See also: bradycardia inducing drugs
From the French ANSM drug interactions document of September 2016, p. 178
PILOCARPINE RxNorm: 8328 ATC: N07AX01 S01EB01 |
ACETYL-CHOLINESTERASE INHIBITORS CLASS CODE: NO6DA-001 |
Risk of addition of the undesirable cholinergic effects, especially digestive |
Take into account |


Please email us at<EMAIL_ADDRESS>Call us at +86-25-84208096.
Fax us at +86-25-84208803.
Visit us at Office 4105, Zifeng Tower, Nanjing, China.
Our professional team is dedicated to providing pharmaceutical-related products and consulting services across the full industry chain around the world. Because we care about our customers, we take the time to research your situation and bring about the most viable solutions ensuring we meet your needs.
We are not just selling our products but also connecting your needs to the local manufacturers, professionals and networks. Focusing on pharmaceutical intermediates, we have been helping our clients unlock the potential markets for more than 28 years.
Chemphar handles all the logistics such as finding the most suitable factory, negotiating prices, final product quality assurance, insurance, shipping and delivery . As matter of fact, we are proud of ourselves in maintaining a small-firm feel by treating every customer's demands with care and consideration. In the past, we have helped our manufacturers to improve GMP and EHS qualification and successfully assisted them to pass US FDA and EU EDQM auditing according to customer's special requirements.


Inherits ArucoUnity.Samples.Utility.CameraDeviceMarkersDetector.
|
| GridBoard | Board [get, set] |
| |
| Dictionary | Dictionary [get, set] |
| |
| DetectorParameters | DetectorParameters [get, set] |
| |
| bool | ApplyRefineStrategy [get, set] |
| |
| float | FixAspectRatio [get, set] |
| |
| CALIB | CalibrationFlags [get, set] |
| |
| string | OutputFilePath [get, set] |
| |
| VectorVectorVectorPoint2f | AllCorners [get] |
| |
| VectorVectorInt | AllIds [get] |
| |
| Size | ImageSize [get] |
| |
| Mat | CameraMatrix [get] |
| |
| Mat | DistCoeffs [get] |
| |
| VectorMat | Rvecs [get] |
| |
| VectorMat | Tvecs [get] |
| |
| double | CalibrationReprojectionError [get] |
| |
| Texture2D | CameraImageTexture [get] |
| | The manipulated camera image texture by the marker detection class. More...
|
| |
| bool | Configurated [get, protected set] |
| | True when the markers detection class is ready and configurated. More...
|
| |
| CameraDeviceController | CameraDeviceController [get, set] |
| | The CameraDeviceController to use. When its active camera device has started, execute the configuration of the marker detection class. More...
|
| |
◆ AddFrameForCalibration()
◆ Calibrate()
| void ArucoUnity.Samples.CalibrateCameraBoard.Calibrate |
( |
string |
calibrationFilePath | ) |
|
|
inline |
◆ Configurate()
| override void ArucoUnity.Samples.CalibrateCameraBoard.Configurate |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ Detect()
◆ ResetCalibration()
| void ArucoUnity.Samples.CalibrateCameraBoard.ResetCalibration |
( |
| ) |
|
|
inline |
◆ AllCorners
◆ AllIds
◆ ApplyRefineStrategy
| bool ArucoUnity.Samples.CalibrateCameraBoard.ApplyRefineStrategy |
|
getset |
◆ Board
| GridBoard ArucoUnity.Samples.CalibrateCameraBoard.Board |
|
getset |
◆ CalibrationFlags
| CALIB ArucoUnity.Samples.CalibrateCameraBoard.CalibrationFlags |
|
getset |
◆ CalibrationReprojectionError
| double ArucoUnity.Samples.CalibrateCameraBoard.CalibrationReprojectionError |
|
get |
◆ CameraMatrix
| Mat ArucoUnity.Samples.CalibrateCameraBoard.CameraMatrix |
|
get |
◆ DetectorParameters
◆ Dictionary
| Dictionary ArucoUnity.Samples.CalibrateCameraBoard.Dictionary |
|
getset |
◆ DistCoeffs
| Mat ArucoUnity.Samples.CalibrateCameraBoard.DistCoeffs |
|
get |
◆ FixAspectRatio
| float ArucoUnity.Samples.CalibrateCameraBoard.FixAspectRatio |
|
getset |
◆ ImageSize
| Size ArucoUnity.Samples.CalibrateCameraBoard.ImageSize |
|
get |
◆ OutputFilePath
| string ArucoUnity.Samples.CalibrateCameraBoard.OutputFilePath |
|
getset |
◆ Rvecs
| VectorMat ArucoUnity.Samples.CalibrateCameraBoard.Rvecs |
|
get |
◆ Tvecs
| VectorMat ArucoUnity.Samples.CalibrateCameraBoard.Tvecs |
|
get |
The documentation for this class was generated from the following file:
- C:/Users/an15400/Documents/aruco-unity/src/aruco_unity_package/Assets/ArucoUnity/Scripts/Samples/CalibrateCameraBoard.cs


ACPLT Objektverwaltung
Data Browser
Dashboard
Loading...
Server name
Load
Auto Refresh every
1
2
3
5
10
30
60
s
KPIs
Database size:
Database free:
Server version:
Konsole
Domain View
Identifier
Type
Class
Access
Semantics
Creation Time
Comment
Instantiate
Delete
Rename
Link
Instantiate
Link
Instantiate
Link
×
References
New link to object:
×
Inspect Variable Object
Resource Locator:
Value:
Edit in Zen Mode
Data Type:
Void
Boolean
Integer
Unsigned Integer
Single Precision
Double Precision
String
Time
Timespan
Byte Vector
Boolean Vector
Integer Vector
Unsigned Integer Vector
Single Precision Vector
Double Precision Vector
String Vector
Time Vector
Timespan Vector
Timestamp:
Quality State:
not supported
unknown
bad
questionable
good
Technical Unit:
Access:
Creation Time:
Semantics:
Comment:
×
Instantiate
Object Path:
Class Path:
Instantiable Class:
×
Rename
Object Name:
×
Delete
Do you really want to delete
?
×
Link
Link Object:
With Path:
×
Search
×
Load Library
Library Name:
Libray Path:


You can take it a step further and have named views within named views (within named views, within named views... you get the idea).
Show some restraint here ;)


Choose a support magic to cast.
Casting magic uses MP of the residence manager.
The residence manager currently has
%mp%
MP remaining.
%all% %magicList%


Steem Developer Portal
RB: Stream Blockchain Transactions
How to stream transactions and operations from Steem blockchain.
Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the RB tutorials repository.
To respond to live activity on the blockchain, a common approach is to make a request for the current block number, access all of the information in that block, and repeat. Many API clients have dedicated tools for simplifying this process. In Radiator, this tool is part of the Radiator::Stream
class. In addition, Radiator will allow you to specify exactly what type of operation you’re interested in.
Sections
- Streaming Transactions
- Streaming Operations
- To Run - Running the example.
Streaming Transactions
In the example script, we can stream transactions with the following arguments:
ruby stream_blockchain_transactions.rb head transactions
This will instruct the script to follow transactions at head block_num
instead of irreversible.
See: head_block_number
vs. last_irreversible_block_num
This is done by using the following ruby:
stream.transactions(*args) do |trx|
puts JSON.pretty_generate trx
end
The args
variable contains the start
(block_num
to start from) and mode
(head
or irreversible
).
Streaming Operations
In the example script, we can also pass the following arguments:
ruby stream_blockchain_transactions.rb head ops comment
This will instruct the script to follow the blockchain at head block_num
instead of irreversible. It will stream operations, with the type of comment
.
The script will allow multiple operation types:
ruby stream_blockchain_transactions.rb head ops comment vote
Virtual operations are also allowed, but make sure to pass irreversible
instead of head
:
ruby stream_blockchain_transactions.rb irreversible ops producer_reward author_reward
Or, if you pass no operation types, the script will stream all types:
ruby stream_blockchain_transactions.rb head ops
This is done by using the following ruby:
stream.operations(type, *args) do |op|
puts op.to_json
end
The type
variable can be nil
or the type of ops we’re looking for whereas args
contains the start
(block_num
to start from) and mode
(head
or irreversible
).
To Run
First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):
git clone git@github.com:steemit/devportal-tutorials-rb.git
cd devportal-tutorials-rb/tutorials/13_stream_blockchain_transactions
bundle install
ruby stream_blockchain_transactions.rb
Example Output
{"voter":"piggypet","author":"tanama","permlink":"daily-2018-9-12","weight":10000}
{"voter":"votes4minnows","author":"askquestion","permlink":"latest-bitcoin-price-and-news-update-13-09-2018","weight":250}
{"voter":"vncedora2018","author":"adncabrera","permlink":"nicomedescuentalacadadelreytanospoema-98jxnjsjzu","weight":10000}
{"voter":"baimatjeh81","author":"albertvhons","permlink":"promoting-steemit-post-via-proof-of-participation-pop","weight":10000}
{"voter":"steemulator","author":"bonanza-kreep","permlink":"communicate-and-travel-with-alfa-enzo-new-social-network","weight":10000}
{"voter":"kernigeetrueset","author":"haejin","permlink":"vitamin-shoppe-vsi-analysis","weight":10000}
{"voter":"borrowedearth","author":"rijalmahyud","permlink":"this-is-my-job","weight":10000}
{"voter":"renatdag","author":"algarion","permlink":"cards-3-1536663927","weight":10000}
{"voter":"elieserurabno","author":"cathyhaack","permlink":"my-introduction-hello-word-of-steemit","weight":10000}
{"voter":"jmotip","author":"glennolua","permlink":"btc-chart-review-sept-12-20-00-pst","weight":10000}
{"voter":"bishalacharya","author":"barber78","permlink":"beautiful-cloudformations","weight":10000}
{"voter":"ivan174","author":"securixio","permlink":"cloud-mining-is-no-longer-profitable","weight":10000}
{"voter":"admiralbot","author":"homsys","permlink":"rare-photo-picture-698-105","weight":-10000}


Source code for bokeh.models.formatters
''' Models for controlling the text and visual formatting of tick
labels on Bokeh plot axes.
'''
from __future__ import absolute_import
from types import FunctionType
from bokeh.util.string import format_docstring
from ..core.enums import LatLon, NumeralLanguage, RoundingFunction
from ..core.has_props import abstract
from ..core.properties import Auto, Bool, Dict, Either, Enum, Instance, Int, List, String
from ..core.validation import error
from ..core.validation.errors import MISSING_MERCATOR_DIMENSION
from ..model import Model
from ..util.compiler import nodejs_compile, CompilationError
from ..util.dependencies import import_required
from ..util.future import get_param_info, signature
from .tickers import Ticker
@abstract
[docs]class BasicTickFormatter(TickFormatter):
''' Display tick values from continuous ranges as "basic numbers",
using scientific notation when appropriate by default.
'''
precision = Either(Auto, Int, help="""
How many digits of precision to display in tick labels.
""")
use_scientific = Bool(True, help="""
Whether to ever display scientific notation. If ``True``, then
when to use scientific notation is controlled by ``power_limit_low``
and ``power_limit_high``.
""")
power_limit_high = Int(5, help="""
Limit the use of scientific notation to when::
log(x) >= power_limit_high
""")
power_limit_low = Int(-3, help="""
Limit the use of scientific notation to when::
log(x) <= power_limit_low
""")
[docs]class MercatorTickFormatter(BasicTickFormatter):
''' TickFormatter for values in WebMercator units.
Some map plot types internally use WebMercator to describe coordinates,
plot bounds, etc. These units are not very human-friendly. This tick
formatter will convert WebMercator units into Latitude and Longitude
for display on axes.
'''
dimension = Enum(LatLon, default=None, help="""
Specify whether to format ticks for Latitude or Longitude.
Projected coordinates are not separable, computing Latitude and Longitude
tick labels from Web Mercator requires considering coordinates from both
dimensions together. Use this property to specify which result should be
used for display.
Typically, if the formatter is for an x-axis, then dimension should be
``"lon"`` and if the formatter is for a y-axis, then the dimension
should be `"lat"``.
In order to prevent hard to debug errors, there is no default value for
dimension. Using an un-configured MercatorTickFormatter will result in
a validation error and a JavaScript console error.
""")
@error(MISSING_MERCATOR_DIMENSION)
def _check_missing_dimension(self):
if self.dimension is None:
return str(self)
[docs]class NumeralTickFormatter(TickFormatter):
''' Tick formatter based on a human-readable format string. '''
format = String("0,0", help="""
The number format, as defined in the following tables:
**NUMBERS**:
============ ============== ===============
Number Format String
============ ============== ===============
10000 '0,0.0000' 10,000.0000
10000.23 '0,0' 10,000
10000.23 '+0,0' +10,000
-10000 '0,0.0' -10,000.0
10000.1234 '0.000' 10000.123
10000.1234 '0[.]00000' 10000.12340
-10000 '(0,0.0000)' (10,000.0000)
-0.23 '.00' -.23
-0.23 '(.00)' (.23)
0.23 '0.00000' 0.23000
0.23 '0.0[0000]' 0.23
1230974 '0.0a' 1.2m
1460 '0 a' 1 k
-104000 '0a' -104k
1 '0o' 1st
52 '0o' 52nd
23 '0o' 23rd
100 '0o' 100th
============ ============== ===============
**CURRENCY**:
=========== =============== =============
Number Format String
=========== =============== =============
1000.234 '$0,0.00' $1,000.23
1000.2 '0,0[.]00 $' 1,000.20 $
1001 '$ 0,0[.]00' $ 1,001
-1000.234 '($0,0)' ($1,000)
-1000.234 '$0.00' -$1000.23
1230974 '($ 0.00 a)' $ 1.23 m
=========== =============== =============
**BYTES**:
=============== =========== ============
Number Format String
=============== =========== ============
100 '0b' 100B
2048 '0 b' 2 KB
7884486213 '0.0b' 7.3GB
3467479682787 '0.000 b' 3.154 TB
=============== =========== ============
**PERCENTAGES**:
============= ============= ===========
Number Format String
============= ============= ===========
1 '0%' 100%
0.974878234 '0.000%' 97.488%
-0.43 '0 %' -43 %
0.43 '(0.000 %)' 43.000 %
============= ============= ===========
**TIME**:
============ ============== ============
Number Format String
============ ============== ============
25 '00:00:00' 0:00:25
238 '00:00:00' 0:03:58
63846 '00:00:00' 17:44:06
============ ============== ============
For the complete specification, see http://numbrojs.com/format.html
""")
language = Enum(NumeralLanguage, default="en", help="""
The language to use for formatting language-specific features (e.g. thousands separator).
""")
rounding = Enum(RoundingFunction, help="""
Rounding functions (round, floor, ceil) and their synonyms (nearest, rounddown, roundup).
""")
[docs]class PrintfTickFormatter(TickFormatter):
''' Tick formatter based on a printf-style format string. '''
format = String("%s", help="""
The number format, as defined as follows: the placeholder in the format
string is marked by % and is followed by one or more of these elements,
in this order:
* An optional ``+`` sign
Causes the result to be preceded with a plus or minus sign on numeric
values. By default, only the ``-`` sign is used on negative numbers.
* An optional padding specifier
Specifies what (if any) character to use for padding. Possible values
are 0 or any other character preceded by a ``'`` (single quote). The
default is to pad with spaces.
* An optional ``-`` sign
Causes sprintf to left-align the result of this placeholder. The default
is to right-align the result.
* An optional number
Specifies how many characters the result should have. If the value to be
returned is shorter than this number, the result will be padded.
* An optional precision modifier
Consists of a ``.`` (dot) followed by a number, specifies how many digits
should be displayed for floating point numbers. When used on a string, it
causes the result to be truncated.
* A type specifier
Can be any of:
- ``%`` --- yields a literal ``%`` character
- ``b`` --- yields an integer as a binary number
- ``c`` --- yields an integer as the character with that ASCII value
- ``d`` or ``i`` --- yields an integer as a signed decimal number
- ``e`` --- yields a float using scientific notation
- ``u`` --- yields an integer as an unsigned decimal number
- ``f`` --- yields a float as is
- ``o`` --- yields an integer as an octal number
- ``s`` --- yields a string as is
- ``x`` --- yields an integer as a hexadecimal number (lower-case)
- ``X`` --- yields an integer as a hexadecimal number (upper-case)
""")
[docs]class LogTickFormatter(TickFormatter):
''' Display tick values from continuous ranges as powers
of some base.
Most often useful in conjunction with a ``LogTicker``.
'''
ticker = Instance(Ticker, help="""
The corresponding ``LogTicker``, used to determine the correct
base to use. If unset, the formatter will use base 10 as a default.
""")
[docs]class CategoricalTickFormatter(TickFormatter):
''' Display tick values from categorical ranges as string
values.
'''
pass
[docs]class FuncTickFormatter(TickFormatter):
''' Display tick values that are formatted by a user-defined function.
'''
@classmethod
[docs] def from_py_func(cls, func):
''' Create a FuncTickFormatter instance from a Python function. The
function is translated to JavaScript using PyScript. The variable
``tick`` will contain the unformatted tick value and can be expected to
be present in the function namespace at render time.
Example:
.. code-block:: python
code = """
def ticker():
return "{:.0f} + {:.2f}".format(tick, tick % 1)
"""
The python function must have no positional arguments. It's
possible to pass Bokeh models (e.g. a ColumnDataSource) as keyword
arguments to the function.
'''
if not isinstance(func, FunctionType):
raise ValueError('CustomJS.from_py_func needs function object.')
pyscript = import_required('flexx.pyscript',
'To use Python functions for CustomJS, you need Flexx ' +
'("conda install -c bokeh flexx" or "pip install flexx")')
sig = signature(func)
all_names, default_values = get_param_info(sig)
if len(all_names) - len(default_values) != 0:
raise ValueError("Function `func` may only contain keyword arguments.")
if default_values and not any([isinstance(value, Model) for value in default_values]):
raise ValueError("Default value must be a Bokeh Model.")
func_kwargs = dict(zip(all_names, default_values))
# Wrap the code attr in a function named `formatter` and call it
# with arguments that match the `args` attr
code = pyscript.py2js(func, 'formatter') + 'return formatter(%s);\n' % ', '.join(all_names)
return cls(code=code, args=func_kwargs)
@classmethod
[docs] def from_coffeescript(cls, code, args={}):
''' Create a FuncTickFormatter instance from a CoffeeScript snippet.
The function body is translated to JavaScript using node. The variable
``tick`` will contain the unformatted tick value and can be expected to
be present in the code snippet namespace at render time.
Example:
.. code-block:: coffeescript
code = """
return Math.floor(tick) + " + " + (tick % 1).toFixed(2)
"""
'''
compiled = nodejs_compile(code, lang="coffeescript", file="???")
if "error" in compiled:
raise CompilationError(compiled.error)
else:
return cls(code=compiled.code, args=args)
args = Dict(String, Instance(Model), help="""
A mapping of names to Bokeh plot objects. These objects are made
available to the formatter code snippet as the values of named
parameters to the callback.
""")
code = String(default="", help="""
A snippet of JavaScript code that reformats a single tick to the desired
format. The variable ``tick`` will contain the unformatted tick value and
can be expected to be present in the code snippet namespace at render time.
Example:
.. code-block:: javascript
code = '''
return Math.floor(tick) + " + " + (tick % 1).toFixed(2)
'''
""")
def _DATETIME_TICK_FORMATTER_HELP(field):
return """
Formats for displaying datetime values in the %s range.
See the :class:`~bokeh.models.formatters.DatetimeTickFormatter` help for a list of all supported formats.
""" % field
[docs]class DatetimeTickFormatter(TickFormatter):
''' A ``TickFormatter`` for displaying datetime values nicely across a
range of scales.
``DatetimeTickFormatter`` has the following properties (listed together
with their default values) that can be used to control the formatting
of axis ticks at different scales scales:
.. code-block:: python
{defaults}
Each scale property can be set to format or list of formats to use for
formatting datetime tick values that fall in in that "time scale".
By default, only the first format string passed for each time scale
will be used. By default, all leading zeros are stripped away from
the formatted labels.
This list of supported `strftime`_ formats is reproduced below.
%a
The abbreviated name of the day of the week according to the
current locale.
%A
The full name of the day of the week according to the current
locale.
%b
The abbreviated month name according to the current locale.
%B
The full month name according to the current locale.
%c
The preferred date and time representation for the current
locale.
%C
The century number (year/100) as a 2-digit integer.
%d
The day of the month as a decimal number (range 01 to 31).
%D
Equivalent to %m/%d/%y. (Americans should note that in many
other countries %d/%m/%y is rather common. This means that in
international context this format is ambiguous and should not
be used.)
%e
Like %d, the day of the month as a decimal number, but a
leading zero is replaced by a space.
%f
Microsecond as a decimal number, zero-padded on the left (range
000000-999999). This is an extension to the set of directives
available to `timezone`_.
%F
Equivalent to %Y-%m-%d (the ISO 8601 date format).
%G
The ISO 8601 week-based year with century as a decimal number.
The 4-digit year corresponding to the ISO week number (see %V).
This has the same format and value as %Y, except that if the
ISO week number belongs to the previous or next year, that year
is used instead.
%g
Like %G, but without century, that is, with a 2-digit year (00-99).
%h
Equivalent to %b.
%H
The hour as a decimal number using a 24-hour clock (range 00
to 23).
%I
The hour as a decimal number using a 12-hour clock (range 01
to 12).
%j
The day of the year as a decimal number (range 001 to 366).
%k
The hour (24-hour clock) as a decimal number (range 0 to 23).
Single digits are preceded by a blank. (See also %H.)
%l
The hour (12-hour clock) as a decimal number (range 1 to 12).
Single digits are preceded by a blank. (See also %I.) (TZ)
%m
The month as a decimal number (range 01 to 12).
%M
The minute as a decimal number (range 00 to 59).
%n
A newline character. Bokeh text does not currently support
newline characters.
%N
Nanosecond as a decimal number, zero-padded on the left (range
000000000-999999999). Supports a padding width specifier, i.e.
%3N displays 3 leftmost digits. However, this is only accurate
to the millisecond level of precision due to limitations of
`timezone`_.
%p
Either "AM" or "PM" according to the given time value, or the
corresponding strings for the current locale. Noon is treated
as "PM" and midnight as "AM".
%P
Like %p but in lowercase: "am" or "pm" or a corresponding
string for the current locale.
%r
The time in a.m. or p.m. notation. In the POSIX locale this
is equivalent to %I:%M:%S %p.
%R
The time in 24-hour notation (%H:%M). For a version including
the seconds, see %T below.
%s
The number of seconds since the Epoch, 1970-01-01 00:00:00
+0000 (UTC).
%S
The second as a decimal number (range 00 to 60). (The range
is up to 60 to allow for occasional leap seconds.)
%t
A tab character. Bokeh text does not currently support tab
characters.
%T
The time in 24-hour notation (%H:%M:%S).
%u
The day of the week as a decimal, range 1 to 7, Monday being 1.
See also %w.
%U
The week number of the current year as a decimal number, range
00 to 53, starting with the first Sunday as the first day of
week 01. See also %V and %W.
%V
The ISO 8601 week number (see NOTES) of the current year as a
decimal number, range 01 to 53, where week 1 is the first week
that has at least 4 days in the new year. See also %U and %W.
%w
The day of the week as a decimal, range 0 to 6, Sunday being 0.
See also %u.
%W
The week number of the current year as a decimal number, range
00 to 53, starting with the first Monday as the first day of
week 01.
%x
The preferred date representation for the current locale
without the time.
%X
The preferred time representation for the current locale
without the date.
%y
The year as a decimal number without a century (range 00 to 99).
%Y
The year as a decimal number including the century.
%z
The +hhmm or -hhmm numeric timezone (that is, the hour and
minute offset from UTC).
%Z
The timezone name or abbreviation.
%%
A literal '%' character.
.. warning::
The client library BokehJS uses the `timezone`_ library to
format datetimes. The inclusion of the list below is based on the
claim that `timezone`_ makes to support "the full compliment
of GNU date format specifiers." However, this claim has not
been tested exhaustively against this list. If you find formats
that do not function as expected, please submit a `github issue`_,
so that the documentation can be updated appropriately.
.. _strftime: http://man7.org/linux/man-pages/man3/strftime.3.html
.. _timezone: http://bigeasy.github.io/timezone/
.. _github issue: https://github.com/bokeh/bokeh/issues
'''
microseconds = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``microseconds``"),
default=['%fus']).accepts(String, lambda fmt: [fmt])
milliseconds = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``milliseconds``"),
default=['%3Nms', '%S.%3Ns']).accepts(String, lambda fmt: [fmt])
seconds = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``seconds``"),
default=['%Ss']).accepts(String, lambda fmt: [fmt])
minsec = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``minsec`` (for combined minutes and seconds)"),
default=[':%M:%S']).accepts(String, lambda fmt: [fmt])
minutes = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``minutes``"),
default=[':%M', '%Mm']).accepts(String, lambda fmt: [fmt])
hourmin = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``hourmin`` (for combined hours and minutes)"),
default=['%H:%M']).accepts(String, lambda fmt: [fmt])
hours = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``hours``"),
default=['%Hh', '%H:%M']).accepts(String, lambda fmt: [fmt])
days = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``days``"),
default=['%m/%d', '%a%d']).accepts(String, lambda fmt: [fmt])
months = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``months``"),
default=['%m/%Y', '%b%y']).accepts(String, lambda fmt: [fmt])
years = List(String,
help=_DATETIME_TICK_FORMATTER_HELP("``years``"),
default=['%Y']).accepts(String, lambda fmt: [fmt])
# This is to automate documentation of DatetimeTickFormatter formats and their defaults
_df = DatetimeTickFormatter()
_df_fields = ['microseconds', 'milliseconds', 'seconds', 'minsec', 'minutes', 'hourmin', 'hours', 'days', 'months', 'years']
_df_defaults = _df.properties_with_values()
_df_defaults_string = "\n\n ".join("%s = %s" % (name, _df_defaults[name]) for name in _df_fields)
DatetimeTickFormatter.__doc__ = format_docstring(DatetimeTickFormatter.__doc__, defaults=_df_defaults_string)
del _df, _df_fields, _df_defaults, _df_defaults_string


|
TIPPU SULTAN
HISTORICAL BIOGRAPHY
|
Tippu's life is an unusual tragedy. Anybody who comes into contact with the facts of his life will be attracted by the drama of his tragic life. This has lead to various dramas and novels on his life in different languages. And histories doing factual justice to his life were practically non-existent.
Tippu
Sultan who fought the English relentlessly is however neither included in the
regional loyalists category nor the national champions'. The book studies Indian
history in a rare light that reflects on other champions of our national cause
and a view of the ugly side of our national pride.
Tippu Sultan's contact with Malabar is a very small portion of his history.
To correctly assess this contact it is necessary to have a proper understanding
of Indian history. More than two thirds of this book contains Indian history.
In that larger Context, relevant Kerala history is described as a 'close up'.
This book is dedicated to the memory of the author's friend P.K. Abdul Khader.
Publisher: D.C.Books Kottayam.
First Published:1959, Parishath Co-operative Society.


#Elvin Omonche( OmoshtheGeek)
Introduction
Hello there, my name is Elvin Omonche, Am an aspiring fullstack web developer
Character wise am a proactive ,sociable, self-motivated individual who values team effort and respects others.
Education wise : I went to high school in Dagoretti High and later on joined the Technical University Of kenya where I studied Bachelors of Technology Information Technology. Currently am at Moringa School studying Software Development
Besides web development I love socializing , travelling,singing and watching documentaries.
What I can Deliver
Am capable of developing and designing
- Front-End System
- Back- End System
- UX (User Experience) & UI (User Interface) design


{% for entry in sidebar %}
{% for subcategory in entry.subcategories %}
{% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "pdf" and subcategory.type != "frontmatter" %}
{{ subcategory.title }}
{% for item in subcategory.items %}
{% if item.audience contains audience and item.product contains product and item.platform contains platform and item.version contains version and item.output contains "pdf" and item.type != "frontmatter"%}
{{item.title}}
{% for thirdlevel in item.thirdlevel %}
{% if thirdlevel.audience contains audience and thirdlevel.platform contains platform and thirdlevel.product contains product and thirdlevel.version contains version and thirdlevel.output contains "pdf" and thirdlevel.type != "frontmatter" %}
{{ thirdlevel.title }}
{% for deeplevel in thirdlevel.thirdlevelitems%}
{% if deeplevel.audience contains audience and deeplevel.product contains product and deeplevel.platform contains platform and deeplevel.version contains version and deeplevel.output contains "pdf" and deeplevel.type != "frontmatter"%}


|
libcoap
4.2.0
|
Pre-defined constants that reflect defaults for CoAP. More...
Go to the source code of this file.
Data Structures | |
| struct | coap_option |
| struct | coap_pdu_t |
| structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload marker (0xff), then the payload if stored inline. More... | |
Macros | |
| #define | COAP_DEFAULT_PORT 5683 /* CoAP default UDP/TCP port */ |
| #define | COAPS_DEFAULT_PORT 5684 /* CoAP default UDP/TCP port for secure transmission */ |
| #define | COAP_DEFAULT_MAX_AGE 60 /* default maximum object lifetime in seconds */ |
| #define | COAP_DEFAULT_MTU 1152 |
| #define | COAP_MESSAGE_SIZE_OFFSET_TCP8 13 |
| #define | COAP_MESSAGE_SIZE_OFFSET_TCP16 269 /* 13 + 256 */ |
| #define | COAP_MESSAGE_SIZE_OFFSET_TCP32 65805 /* 269 + 65536 */ |
| #define | COAP_MAX_MESSAGE_SIZE_TCP0 (COAP_MESSAGE_SIZE_OFFSET_TCP8-1) /* 12 */ |
| #define | COAP_MAX_MESSAGE_SIZE_TCP8 (COAP_MESSAGE_SIZE_OFFSET_TCP16-1) /* 268 */ |
| #define | COAP_MAX_MESSAGE_SIZE_TCP16 (COAP_MESSAGE_SIZE_OFFSET_TCP32-1) /* 65804 */ |
| #define | COAP_MAX_MESSAGE_SIZE_TCP32 (COAP_MESSAGE_SIZE_OFFSET_TCP32+0xFFFFFFFF) |
| #define | COAP_DEFAULT_MAX_PDU_RX_SIZE (8*1024*1024+256) |
| #define | COAP_DEBUG_BUF_SIZE (8 + 1024 * 2) |
| #define | COAP_DEFAULT_VERSION 1 /* version of CoAP supported */ |
| #define | COAP_DEFAULT_SCHEME "coap" /* the default scheme for CoAP URIs */ |
| #define | COAP_DEFAULT_URI_WELLKNOWN ".well-known/core" |
| well-known resources URI More... | |
| #define | COAP_MESSAGE_CON 0 /* confirmable message (requires ACK/RST) */ |
| #define | COAP_MESSAGE_NON 1 /* non-confirmable message (one-shot message) */ |
| #define | COAP_MESSAGE_ACK 2 /* used to acknowledge confirmable messages */ |
| #define | COAP_MESSAGE_RST 3 /* indicates error in received messages */ |
| #define | COAP_REQUEST_GET 1 |
| #define | COAP_REQUEST_POST 2 |
| #define | COAP_REQUEST_PUT 3 |
| #define | COAP_REQUEST_DELETE 4 |
| #define | COAP_REQUEST_FETCH 5 /* RFC 8132 */ |
| #define | COAP_REQUEST_PATCH 6 /* RFC 8132 */ |
| #define | COAP_REQUEST_IPATCH 7 /* RFC 8132 */ |
| #define | COAP_OPTION_IF_MATCH 1 /* C, opaque, 0-8 B, (none) */ |
| #define | COAP_OPTION_URI_HOST 3 /* C, String, 1-255 B, destination address */ |
| #define | COAP_OPTION_ETAG 4 /* E, opaque, 1-8 B, (none) */ |
| #define | COAP_OPTION_IF_NONE_MATCH 5 /* empty, 0 B, (none) */ |
| #define | COAP_OPTION_URI_PORT 7 /* C, uint, 0-2 B, destination port */ |
| #define | COAP_OPTION_LOCATION_PATH 8 /* E, String, 0-255 B, - */ |
| #define | COAP_OPTION_URI_PATH 11 /* C, String, 0-255 B, (none) */ |
| #define | COAP_OPTION_CONTENT_FORMAT 12 /* E, uint, 0-2 B, (none) */ |
| #define | COAP_OPTION_CONTENT_TYPE COAP_OPTION_CONTENT_FORMAT |
| #define | COAP_OPTION_MAXAGE 14 /* E, uint, 0--4 B, 60 Seconds */ |
| #define | COAP_OPTION_URI_QUERY 15 /* C, String, 1-255 B, (none) */ |
| #define | COAP_OPTION_ACCEPT 17 /* C, uint, 0-2 B, (none) */ |
| #define | COAP_OPTION_LOCATION_QUERY 20 /* E, String, 0-255 B, (none) */ |
| #define | COAP_OPTION_SIZE2 28 /* E, uint, 0-4 B, (none) */ |
| #define | COAP_OPTION_PROXY_URI 35 /* C, String, 1-1034 B, (none) */ |
| #define | COAP_OPTION_PROXY_SCHEME 39 /* C, String, 1-255 B, (none) */ |
| #define | COAP_OPTION_SIZE1 60 /* E, uint, 0-4 B, (none) */ |
| #define | COAP_OPTION_OBSERVE 6 /* E, empty/uint, 0 B/0-3 B, (none) */ |
| #define | COAP_OPTION_SUBSCRIPTION COAP_OPTION_OBSERVE |
| #define | COAP_OPTION_BLOCK2 23 /* C, uint, 0--3 B, (none) */ |
| #define | COAP_OPTION_BLOCK1 27 /* C, uint, 0--3 B, (none) */ |
| #define | COAP_OPTION_NORESPONSE 258 /* N, uint, 0--1 B, 0 */ |
| #define | COAP_MAX_OPT 65535 |
| the highest option number we know More... | |
| #define | COAP_RESPONSE_CODE(N) (((N)/100 << 5) | (N)%100) |
| #define | COAP_RESPONSE_CLASS(C) (((C) >> 5) & 0xFF) |
| #define | COAP_ERROR_PHRASE_LENGTH 32 |
| maximum length of error phrase More... | |
| #define | COAP_RESPONSE_200 COAP_RESPONSE_CODE(200) /* 2.00 OK */ |
| #define | COAP_RESPONSE_201 COAP_RESPONSE_CODE(201) /* 2.01 Created */ |
| #define | COAP_RESPONSE_304 COAP_RESPONSE_CODE(203) /* 2.03 Valid */ |
| #define | COAP_RESPONSE_400 COAP_RESPONSE_CODE(400) /* 4.00 Bad Request */ |
| #define | COAP_RESPONSE_404 COAP_RESPONSE_CODE(404) /* 4.04 Not Found */ |
| #define | COAP_RESPONSE_405 COAP_RESPONSE_CODE(405) /* 4.05 Method Not Allowed */ |
| #define | COAP_RESPONSE_415 COAP_RESPONSE_CODE(415) /* 4.15 Unsupported Media Type */ |
| #define | COAP_RESPONSE_500 COAP_RESPONSE_CODE(500) /* 5.00 Internal Server Error */ |
| #define | COAP_RESPONSE_501 COAP_RESPONSE_CODE(501) /* 5.01 Not Implemented */ |
| #define | COAP_RESPONSE_503 COAP_RESPONSE_CODE(503) /* 5.03 Service Unavailable */ |
| #define | COAP_RESPONSE_504 COAP_RESPONSE_CODE(504) /* 5.04 Gateway Timeout */ |
| #define | COAP_RESPONSE_X_242 COAP_RESPONSE_CODE(402) /* Critical Option not supported */ |
| #define | COAP_SIGNALING_CODE(N) (((N)/100 << 5) | (N)%100) |
| #define | COAP_SIGNALING_CSM COAP_SIGNALING_CODE(701) |
| #define | COAP_SIGNALING_PING COAP_SIGNALING_CODE(702) |
| #define | COAP_SIGNALING_PONG COAP_SIGNALING_CODE(703) |
| #define | COAP_SIGNALING_RELEASE COAP_SIGNALING_CODE(704) |
| #define | COAP_SIGNALING_ABORT COAP_SIGNALING_CODE(705) |
| #define | COAP_SIGNALING_OPTION_MAX_MESSAGE_SIZE 2 |
| #define | COAP_SIGNALING_OPTION_BLOCK_WISE_TRANSFER 4 |
| #define | COAP_SIGNALING_OPTION_CUSTODY 2 |
| #define | COAP_SIGNALING_OPTION_ALTERNATIVE_ADDRESS 2 |
| #define | COAP_SIGNALING_OPTION_HOLD_OFF 4 |
| #define | COAP_SIGNALING_OPTION_BAD_CSM_OPTION 2 |
| #define | COAP_MEDIATYPE_TEXT_PLAIN 0 /* text/plain (UTF-8) */ |
| #define | COAP_MEDIATYPE_APPLICATION_LINK_FORMAT 40 /* application/link-format */ |
| #define | COAP_MEDIATYPE_APPLICATION_XML 41 /* application/xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_OCTET_STREAM 42 /* application/octet-stream */ |
| #define | COAP_MEDIATYPE_APPLICATION_RDF_XML 43 /* application/rdf+xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_EXI 47 /* application/exi */ |
| #define | COAP_MEDIATYPE_APPLICATION_JSON 50 /* application/json */ |
| #define | COAP_MEDIATYPE_APPLICATION_CBOR 60 /* application/cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_SIGN 98 /* application/cose; cose-type="cose-sign" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_SIGN1 18 /* application/cose; cose-type="cose-sign1" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT 96 /* application/cose; cose-type="cose-encrypt" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0 16 /* application/cose; cose-type="cose-encrypt0" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_MAC 97 /* application/cose; cose-type="cose-mac" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_MAC0 17 /* application/cose; cose-type="cose-mac0" */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_KEY 101 /* application/cose-key */ |
| #define | COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET 102 /* application/cose-key-set */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_JSON 110 /* application/senml+json */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_JSON 111 /* application/sensml+json */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_CBOR 112 /* application/senml+cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_CBOR 113 /* application/sensml+cbor */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_EXI 114 /* application/senml-exi */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_EXI 115 /* application/sensml-exi */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENML_XML 310 /* application/senml+xml */ |
| #define | COAP_MEDIATYPE_APPLICATION_SENSML_XML 311 /* application/sensml+xml */ |
| #define | COAP_MEDIATYPE_ANY 0xff /* any media type */ |
| #define | COAP_INVALID_TID -1 |
| Indicates an invalid transaction id. More... | |
| #define | COAP_DROPPED_RESPONSE -2 |
| Indicates that a response is suppressed. More... | |
| #define | COAP_PDU_DELAYED -3 |
| #define | COAP_OPT_LONG |
| #define | COAP_OPT_END 0xF0 /* end marker */ |
| #define | COAP_PAYLOAD_START 0xFF /* payload marker */ |
| #define | COAP_OPTION_KEY(option) (option).key |
| #define | COAP_OPTION_LENGTH(option) (option).length |
| #define | COAP_OPTION_DATA(option) ((unsigned char *)&(option) + sizeof(coap_option)) |
| #define | COAP_PDU_IS_EMPTY(pdu) ((pdu)->code == 0) |
| #define | COAP_PDU_IS_REQUEST(pdu) (!COAP_PDU_IS_EMPTY(pdu) && (pdu)->code < 32) |
| #define | COAP_PDU_IS_RESPONSE(pdu) ((pdu)->code >= 64 && (pdu)->code < 224) |
| #define | COAP_PDU_IS_SIGNALING(pdu) ((pdu)->code >= 224) |
| #define | COAP_PDU_MAX_UDP_HEADER_SIZE 4 |
| #define | COAP_PDU_MAX_TCP_HEADER_SIZE 6 |
| #define | COAP_PROTO_NONE 0 |
| coap_proto_t values More... | |
| #define | COAP_PROTO_UDP 1 |
| #define | COAP_PROTO_DTLS 2 |
| #define | COAP_PROTO_TCP 3 |
| #define | COAP_PROTO_TLS 4 |
Typedefs | |
| typedef int | coap_tid_t |
| coap_tid_t is used to store CoAP transaction id, i.e. More... | |
| typedef struct coap_pdu_t | coap_pdu_t |
| structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload marker (0xff), then the payload if stored inline. More... | |
| typedef uint8_t | coap_proto_t |
Functions | |
| const char * | coap_response_phrase (unsigned char code) |
Returns a human-readable response phrase for the specified CoAP response code . More... | |
| coap_pdu_t * | coap_pdu_init (uint8_t type, uint8_t code, uint16_t tid, size_t size) |
Creates a new CoAP PDU with at least enough storage space for the given size maximum message size. More... | |
| int | coap_pdu_resize (coap_pdu_t *pdu, size_t new_size) |
Dynamically grows the size of pdu to new_size . More... | |
| void | coap_pdu_clear (coap_pdu_t *pdu, size_t size) |
Clears any contents from pdu and resets used_size , and data pointers. More... | |
| coap_pdu_t * | coap_new_pdu (const struct coap_session_t *session) |
| Creates a new CoAP PDU. More... | |
| void | coap_delete_pdu (coap_pdu_t *) |
| Dispose of an CoAP PDU and frees associated storage. More... | |
| size_t | coap_pdu_parse_header_size (coap_proto_t proto, const uint8_t *data) |
Interprets data to determine the number of bytes in the header. More... | |
| size_t | coap_pdu_parse_size (coap_proto_t proto, const uint8_t *data, size_t length) |
Parses data to extract the message size. More... | |
| int | coap_pdu_parse_header (coap_pdu_t *pdu, coap_proto_t proto) |
| Decode the protocol specific header for the specified PDU. More... | |
| int | coap_pdu_parse_opt (coap_pdu_t *pdu) |
| Verify consistency in the given CoAP PDU structure and locate the data. More... | |
| int | coap_pdu_parse (coap_proto_t proto, const uint8_t *data, size_t length, coap_pdu_t *pdu) |
Parses data into the CoAP PDU structure given in result . More... | |
| int | coap_add_token (coap_pdu_t *pdu, size_t len, const uint8_t *data) |
Adds token of length len to pdu . More... | |
| size_t | coap_add_option (coap_pdu_t *pdu, uint16_t type, size_t len, const uint8_t *data) |
| Adds option of given type to pdu that is passed as first parameter. More... | |
| uint8_t * | coap_add_option_later (coap_pdu_t *pdu, uint16_t type, size_t len) |
| Adds option of given type to pdu that is passed as first parameter, but does not write a value. More... | |
| int | coap_add_data (coap_pdu_t *pdu, size_t len, const uint8_t *data) |
| Adds given data to the pdu that is passed as first parameter. More... | |
| uint8_t * | coap_add_data_after (coap_pdu_t *pdu, size_t len) |
| Adds given data to the pdu that is passed as first parameter but does not copyt it. More... | |
| int | coap_get_data (const coap_pdu_t *pdu, size_t *len, uint8_t **data) |
| Retrieves the length and data pointer of specified PDU. More... | |
| size_t | coap_pdu_encode_header (coap_pdu_t *pdu, coap_proto_t proto) |
| Compose the protocol specific header for the specified PDU. More... | |
Pre-defined constants that reflect defaults for CoAP.
Definition in file pdu.h.
| #define COAP_DEFAULT_MAX_AGE 60 /* default maximum object lifetime in seconds */ |
| #define COAP_DEFAULT_SCHEME "coap" /* the default scheme for CoAP URIs */ |
| #define COAP_DEFAULT_URI_WELLKNOWN ".well-known/core" |
| #define COAP_DROPPED_RESPONSE -2 |
| #define COAP_ERROR_PHRASE_LENGTH 32 |
| #define COAP_INVALID_TID -1 |
| #define COAP_MAX_MESSAGE_SIZE_TCP0 (COAP_MESSAGE_SIZE_OFFSET_TCP8-1) /* 12 */ |
| #define COAP_MAX_MESSAGE_SIZE_TCP16 (COAP_MESSAGE_SIZE_OFFSET_TCP32-1) /* 65804 */ |
| #define COAP_MAX_MESSAGE_SIZE_TCP32 (COAP_MESSAGE_SIZE_OFFSET_TCP32+0xFFFFFFFF) |
| #define COAP_MAX_MESSAGE_SIZE_TCP8 (COAP_MESSAGE_SIZE_OFFSET_TCP16-1) /* 268 */ |
| #define COAP_MEDIATYPE_APPLICATION_CBOR 60 /* application/cbor */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT 96 /* application/cose; cose-type="cose-encrypt" */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0 16 /* application/cose; cose-type="cose-encrypt0" */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_KEY 101 /* application/cose-key */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET 102 /* application/cose-key-set */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_MAC 97 /* application/cose; cose-type="cose-mac" */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_MAC0 17 /* application/cose; cose-type="cose-mac0" */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_SIGN 98 /* application/cose; cose-type="cose-sign" */ |
| #define COAP_MEDIATYPE_APPLICATION_COSE_SIGN1 18 /* application/cose; cose-type="cose-sign1" */ |
| #define COAP_MEDIATYPE_APPLICATION_EXI 47 /* application/exi */ |
| #define COAP_MEDIATYPE_APPLICATION_JSON 50 /* application/json */ |
| #define COAP_MEDIATYPE_APPLICATION_LINK_FORMAT 40 /* application/link-format */ |
| #define COAP_MEDIATYPE_APPLICATION_OCTET_STREAM 42 /* application/octet-stream */ |
| #define COAP_MEDIATYPE_APPLICATION_RDF_XML 43 /* application/rdf+xml */ |
| #define COAP_MEDIATYPE_APPLICATION_SENML_CBOR 112 /* application/senml+cbor */ |
| #define COAP_MEDIATYPE_APPLICATION_SENML_EXI 114 /* application/senml-exi */ |
| #define COAP_MEDIATYPE_APPLICATION_SENML_JSON 110 /* application/senml+json */ |
| #define COAP_MEDIATYPE_APPLICATION_SENML_XML 310 /* application/senml+xml */ |
| #define COAP_MEDIATYPE_APPLICATION_SENSML_CBOR 113 /* application/sensml+cbor */ |
| #define COAP_MEDIATYPE_APPLICATION_SENSML_EXI 115 /* application/sensml-exi */ |
| #define COAP_MEDIATYPE_APPLICATION_SENSML_JSON 111 /* application/sensml+json */ |
| #define COAP_MEDIATYPE_APPLICATION_SENSML_XML 311 /* application/sensml+xml */ |
| #define COAP_MEDIATYPE_APPLICATION_XML 41 /* application/xml */ |
| #define COAP_MESSAGE_ACK 2 /* used to acknowledge confirmable messages */ |
| #define COAP_MESSAGE_CON 0 /* confirmable message (requires ACK/RST) */ |
| #define COAP_MESSAGE_NON 1 /* non-confirmable message (one-shot message) */ |
| #define COAP_MESSAGE_RST 3 /* indicates error in received messages */ |
| #define COAP_OPT_LONG |
| #define COAP_OPTION_CONTENT_FORMAT 12 /* E, uint, 0-2 B, (none) */ |
| #define COAP_OPTION_CONTENT_TYPE COAP_OPTION_CONTENT_FORMAT |
| #define COAP_OPTION_DATA | ( | option | ) | ((unsigned char *)&(option) + sizeof(coap_option)) |
| #define COAP_OPTION_LOCATION_PATH 8 /* E, String, 0-255 B, - */ |
| #define COAP_OPTION_LOCATION_QUERY 20 /* E, String, 0-255 B, (none) */ |
| #define COAP_OPTION_MAXAGE 14 /* E, uint, 0--4 B, 60 Seconds */ |
| #define COAP_OPTION_OBSERVE 6 /* E, empty/uint, 0 B/0-3 B, (none) */ |
| #define COAP_OPTION_PROXY_SCHEME 39 /* C, String, 1-255 B, (none) */ |
| #define COAP_OPTION_PROXY_URI 35 /* C, String, 1-1034 B, (none) */ |
| #define COAP_OPTION_SUBSCRIPTION COAP_OPTION_OBSERVE |
| #define COAP_OPTION_URI_HOST 3 /* C, String, 1-255 B, destination address */ |
| #define COAP_OPTION_URI_PATH 11 /* C, String, 0-255 B, (none) */ |
| #define COAP_OPTION_URI_PORT 7 /* C, uint, 0-2 B, destination port */ |
| #define COAP_OPTION_URI_QUERY 15 /* C, String, 1-255 B, (none) */ |
| #define COAP_PDU_IS_REQUEST | ( | pdu | ) | (!COAP_PDU_IS_EMPTY(pdu) && (pdu)->code < 32) |
| #define COAP_PDU_IS_RESPONSE | ( | pdu | ) | ((pdu)->code >= 64 && (pdu)->code < 224) |
| #define COAP_RESPONSE_200 COAP_RESPONSE_CODE(200) /* 2.00 OK */ |
| #define COAP_RESPONSE_201 COAP_RESPONSE_CODE(201) /* 2.01 Created */ |
| #define COAP_RESPONSE_304 COAP_RESPONSE_CODE(203) /* 2.03 Valid */ |
| #define COAP_RESPONSE_400 COAP_RESPONSE_CODE(400) /* 4.00 Bad Request */ |
| #define COAP_RESPONSE_404 COAP_RESPONSE_CODE(404) /* 4.04 Not Found */ |
| #define COAP_RESPONSE_405 COAP_RESPONSE_CODE(405) /* 4.05 Method Not Allowed */ |
| #define COAP_RESPONSE_415 COAP_RESPONSE_CODE(415) /* 4.15 Unsupported Media Type */ |
| #define COAP_RESPONSE_500 COAP_RESPONSE_CODE(500) /* 5.00 Internal Server Error */ |
| #define COAP_RESPONSE_501 COAP_RESPONSE_CODE(501) /* 5.01 Not Implemented */ |
| #define COAP_RESPONSE_503 COAP_RESPONSE_CODE(503) /* 5.03 Service Unavailable */ |
| #define COAP_RESPONSE_504 COAP_RESPONSE_CODE(504) /* 5.04 Gateway Timeout */ |
| #define COAP_RESPONSE_X_242 COAP_RESPONSE_CODE(402) /* Critical Option not supported */ |
| #define COAP_SIGNALING_ABORT COAP_SIGNALING_CODE(705) |
| #define COAP_SIGNALING_CSM COAP_SIGNALING_CODE(701) |
| #define COAP_SIGNALING_PING COAP_SIGNALING_CODE(702) |
| #define COAP_SIGNALING_PONG COAP_SIGNALING_CODE(703) |
| #define COAP_SIGNALING_RELEASE COAP_SIGNALING_CODE(704) |
| #define COAPS_DEFAULT_PORT 5684 /* CoAP default UDP/TCP port for secure transmission */ |
| typedef struct coap_pdu_t coap_pdu_t |
structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload marker (0xff), then the payload if stored inline.
Memory layout is: <—header—>|<—token—><—options—>0xff<—payload—> header is addressed with a negative offset to token, its maximum size is max_hdr_size. options starts at token + token_length payload starts at data, its length is used_size - (data - token)
| typedef uint8_t coap_proto_t |
| typedef int coap_tid_t |
| int coap_add_data | ( | coap_pdu_t * | pdu, |
| size_t | len, | ||
| const uint8_t * | data | ||
| ) |
Adds given data to the pdu that is passed as first parameter.
Note that the PDU's data is destroyed by coap_add_option(). coap_add_data() must be called only once per PDU, otherwise the result is undefined.
Definition at line 302 of file pdu.c.
| uint8_t* coap_add_data_after | ( | coap_pdu_t * | pdu, |
| size_t | len | ||
| ) |
Adds given data to the pdu that is passed as first parameter but does not copyt it.
Note that the PDU's data is destroyed by coap_add_option(). coap_add_data() must be have been called once for this PDU, otherwise the result is undefined. The actual data must be copied at the returned location.
Definition at line 314 of file pdu.c.
| size_t coap_add_option | ( | coap_pdu_t * | pdu, |
| uint16_t | type, | ||
| size_t | len, | ||
| const uint8_t * | data | ||
| ) |
Adds option of given type to pdu that is passed as first parameter.
coap_add_option() destroys the PDU's data, so coap_add_data() must be called after all options have been added. As coap_add_token() destroys the options following the token, the token must be added before coap_add_option() is called. This function returns the number of bytes written or 0
on error.
Definition at line 229 of file pdu.c.
| uint8_t* coap_add_option_later | ( | coap_pdu_t * | pdu, |
| uint16_t | type, | ||
| size_t | len | ||
| ) |
Adds option of given type to pdu that is passed as first parameter, but does not write a value.
It works like coap_add_option with respect to calling sequence (i.e. after token and before data). This function returns a memory address to which the option data has to be written before the PDU can be sent, or NULL
on error.
Definition at line 266 of file pdu.c.
| int coap_add_token | ( | coap_pdu_t * | pdu, |
| size_t | len, | ||
| const uint8_t * | data | ||
| ) |
Adds token of length len
to pdu
.
Adding the token destroys any following contents of the pdu. Hence options and data must be added after coap_add_token() has been called. In pdu
, length is set to len
+ 4
, and max_delta is set to 0
. This function returns 0
on error or a value greater than zero on success.
| pdu | The PDU where the token is to be added. |
| len | The length of the new token. |
| data | The token to add. |
0
on error. Definition at line 205 of file pdu.c.
| void coap_delete_pdu | ( | coap_pdu_t * | ) |
Dispose of an CoAP PDU and frees associated storage.
Not that in general you should not call this function directly. When a PDU is sent with coap_send(), coap_delete_pdu() will be called automatically for you.
Definition at line 141 of file pdu.c.
| int coap_get_data | ( | const coap_pdu_t * | pdu, |
| size_t * | len, | ||
| uint8_t ** | data | ||
| ) |
| coap_pdu_t* coap_new_pdu | ( | const struct coap_session_t * | session | ) |
| void coap_pdu_clear | ( | coap_pdu_t * | pdu, |
| size_t | size | ||
| ) |
Clears any contents from pdu
and resets used_size
, and data
pointers.
max_size
is set to size
, any other field is set to 0
. Note that pdu
must be a valid pointer to a coap_pdu_t object created e.g. by coap_pdu_init().
Definition at line 46 of file pdu.c.
| size_t coap_pdu_encode_header | ( | coap_pdu_t * | pdu, |
| coap_proto_t | proto | ||
| ) |
| coap_pdu_t* coap_pdu_init | ( | uint8_t | type, |
| uint8_t | code, | ||
| uint16_t | tid, | ||
| size_t | size | ||
| ) |
Creates a new CoAP PDU with at least enough storage space for the given size
maximum message size.
The function returns a pointer to the node coap_pdu_t object on success, or NULL
on error. The storage allocated for the result must be released with coap_delete_pdu() if coap_send() is not called.
| type | The type of the PDU (one of COAP_MESSAGE_CON, COAP_MESSAGE_NON, COAP_MESSAGE_ACK, COAP_MESSAGE_RST). |
| code | The message code. |
| tid | The transcation id to set or 0 if unknown / not applicable. |
| size | The maximum allowed number of byte for the message. |
NULL
on error. Definition at line 91 of file pdu.c.
| int coap_pdu_parse | ( | coap_proto_t | proto, |
| const uint8_t * | data, | ||
| size_t | length, | ||
| coap_pdu_t * | pdu | ||
| ) |
Parses data
into the CoAP PDU structure given in result
.
The target pdu must be large enough to This function returns 0
on error or a number greater than zero on success.
| proto | Session's protocol |
| data | The raw data to parse as CoAP PDU. |
| length | The actual size of data . |
| pdu | The PDU structure to fill. Note that the structure must provide space to hold at least the token and options part of the message. |
0
on error. Definition at line 557 of file pdu.c.
| int coap_pdu_parse_header | ( | coap_pdu_t * | pdu, |
| coap_proto_t | proto | ||
| ) |
| size_t coap_pdu_parse_header_size | ( | coap_proto_t | proto, |
| const uint8_t * | data | ||
| ) |
Interprets data
to determine the number of bytes in the header.
This function returns 0
on error or a number greater than zero on success.
| proto | Session's protocol |
| data | The first byte of raw data to parse as CoAP PDU. |
0
on error. Definition at line 419 of file pdu.c.
| int coap_pdu_parse_opt | ( | coap_pdu_t * | pdu | ) |
Verify consistency in the given CoAP PDU structure and locate the data.
This function returns 0
on error or a number greater than zero on success. This function only parses the token and options, up to the payload start marker.
| pdu | The PDU structure to. |
0
on error. Definition at line 506 of file pdu.c.
| size_t coap_pdu_parse_size | ( | coap_proto_t | proto, |
| const uint8_t * | data, | ||
| size_t | length | ||
| ) |
Parses data
to extract the message size.
length
must be at least coap_pdu_parse_header_size(proto, data). This function returns 0
on error or a number greater than zero on success.
| proto | Session's protocol |
| data | The raw data to parse as CoAP PDU. |
| length | The actual size of data . |
0
on error. Definition at line 442 of file pdu.c.
| int coap_pdu_resize | ( | coap_pdu_t * | pdu, |
| size_t | new_size | ||
| ) |
Dynamically grows the size of pdu
to new_size
.
The new size must not exceed the PDU's configure maximum size. On success, this function returns 1, otherwise 0.
| pdu | The PDU to resize. |
| new_size | The new size in bytes. |
Definition at line 154 of file pdu.c.
| const char* coap_response_phrase | ( | unsigned char | code | ) |
Returns a human-readable response phrase for the specified CoAP response code
.
This function returns NULL
if not found.
| code | The response code for which the literal phrase should be retrieved. |
NULL
if not found. Definition at line 384 of file pdu.c.